Master Client Disconnects When Second Player Joins

Hi. Sometimes when I have a single player in a room and a second player joins, the first player will disconnect. I tried finding the reason for the disconnect and the message is "DisconnectCause.DisconnectByServerReasonUnknown". The PUN logs don't seem to say why it's happening either. Usually this happens when I leave the first player in a room doing nothing for about 2-5 minutes and then have another player join which disconnects the first player. Is there some sort of AFK timer that triggers this even though the game is running (not in background)?

Comments

  • bump. Any help appreciated. I'm using PUN 2.13 and it is still happening.
  • Hi @CheeseBrownie,

    My guess: when the second client joins, the first client does some logic that triggers the disconnects (probably in the join callback). Either sending too much data or sending malformed one. What do you do from the first/master client when the second client joins (could you share code snippets)? try commenting that out and see if the issue persists.
  • I solved it. You were correct about sending too much data when someone joined. Thanks a lot!
Sign In or Register to comment.