Only show players if they've managed to connect#551
Merged
Conversation
ae19e55 to
5ca3b19
Compare
norraxx
reviewed
Mar 24, 2020
| player = game_connection.player | ||
| del self._connections[player] | ||
|
|
||
| if player: |
Collaborator
There was a problem hiding this comment.
if not player - when that situation will happen?
Collaborator
Author
There was a problem hiding this comment.
I don't think it can actually.
cleborys
reviewed
Mar 24, 2020
52a92fc to
55afc2c
Compare
55afc2c to
761f0c3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Might fix #225.
When doing testing of the game result issue and struggling with getting the ICE adapter to connect two machines on the same network I noticed what might be causing the display of extra players in lobby.
The server would count a player as "in-lobby" as soon as they sent
GameState: Lobbymeaning as soon as their game made it to theconnecting to hostscreen. This means if someone was trying to join a lobby, but could not connect to the host, it would still falsely bump thenum_playerswhich might cause the lobby to appear full when it was actually one player short.It seems like the only way to detect if a player has successfully connected to the host is by the host sending
PlayerOptioncommands for them. So we can use the presence of player options as an indicator for successful connection.I'm not sure if this is the only reason why this bug occurs so I'll leave the issue open for now.