sshtron
sshtron copied to clipboard
Server player count is slightly off (-1)
./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
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.