[bug]realtime example server script

0

Sorry if this is the wrong spot to report such things, if i should post elsewhere please let me know.

I'm working on integrating realtime server protocol with my c++ game and have discovered a bug in the example realtime script found in the aws docs(the bug might be a deeper problem in rts scripts themselves). If a client opens a web socket connection, but never sends the login message, then disconnects, the script will call player disconnected, and decrement the active users without ever having incremented it(since the player was never accepted in the first place) since the script only ends when activeclients==0 this results in the script effectively never terminating.

I'm unsure if this is a deeper problem where an unauthenticated user is allow to trigger a disconnect even though they havent authenticated, but if not then the script should be updated to address this problem and make devs aware of its possibility.

posta 3 anni fa189 visualizzazioni
2 Risposte
0

Hi, Can you provide more details on which script you are referring to?

con risposta 3 anni fa
0

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.

con risposta 3 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande