Hi, Can you provide more details on which script you are referring to?
The one found here: https://docs.aws.amazon.com/gamelift/latest/developerguide/realtime-script.html
onPlayerDisconnect can be called without onPlayerAccepted being called, which means activePlayers can be negative and the script never ends.
secondly another bug exists in onPlayerDisconnect where the disconnect messages are sent to the disconnected player instead of all the still connected players.
NodeJs server SDK
Installing NodeJS + NPM in a Build fleet (not Realtime Script)asked 4 months ago
How do I access dynamodb(or lambda) from a real-time server?Accepted Answerasked 3 years ago
How to communicate with GameLift Server with Java Clientasked a year ago
How to report another AWS server has performed vunerability scanning on my server?asked 6 months ago
Reconnecting PlayerSessions - Gamelift Realtimeasked 2 years ago
Realtime Gamelift Script Server QuestionsAccepted Answerasked 2 years ago
Can I run more than one game session on a single game server process?Accepted Answer
What exactly is the difference between Custom vs Realtime servers in gamelift?asked 9 months ago
[bug]realtime example server scriptasked 2 years ago