[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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ