Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game crashes/closes when hosting a game second time and first player joins without closing the game in between. #28

Open
Roupp opened this issue Oct 11, 2024 · 0 comments

Comments

@Roupp
Copy link

Roupp commented Oct 11, 2024

Problem:
I'm able to host and join clients to game with similar logic that the "demo" branch contains and play normally for the first match.
However after first match is played, then peer.close() is called on host which will disconnect all players from host.
Then if same player will host another game session/match without closing the game in between, then the game will crash as soon as first player joins the new session.

New steam lobby is created for each match and creating + joining Steam lobby works with GodotSteam, but when creating socket connection with steam-multiplayer-peer, then the game on host will crash as soon as first player joins.
The client's game does not crash during connecting but they receive server disconnected signal as the host's game has crashed.

I'm wondering if the first SteamMultiplayerPeer that was used to host the first match is somehow still in memory and is causing this problem when the second match is hosted with new SteamMultiplayerPeer.

What is the correct way to close/dispose the SteamMultiplayerPeer after each match and then initialize new SteamMultiplayerPeer for next match without making the game crash on host?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant