sshtron icon indicating copy to clipboard operation
sshtron copied to clipboard

Server player count is slightly off (-1)

Open hashworks opened this issue 8 years ago • 1 comments

./sshtron
Listening on port :2022 for SSH and port :3043 for HTTP...
Player joined. Current stats: 0 users, 0 games  <-- Should be 1 user, 0 games
Player joined. Current stats: 1 users, 1 games  <-- Should be 2 users, 1 game
EOF
EOF

hashworks avatar Mar 11 '16 15:03 hashworks

This is happening because the debug message is being printed before the new session is actually registered.

Perhaps a better place to put that debug message would be in the GameManager when it registers a new session? If we print the debug message directly after a new session is registered, the numbers should be accurate.

zachlatta avatar Mar 11 '16 19:03 zachlatta