[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.

已提問 3 年前檢視次數 189 次
2 個答案
0

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

已回答 3 年前
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.

已回答 3 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南