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

Server player count is slightly off (-1) #12

Open
hashworks opened this issue Mar 11, 2016 · 1 comment
Open

Server player count is slightly off (-1) #12

hashworks opened this issue Mar 11, 2016 · 1 comment

Comments

@hashworks
Copy link

./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
@zachlatta
Copy link
Owner

zachlatta commented Mar 11, 2016

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.

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

2 participants