[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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠