reasons for client being disconnected

Options
Hello!

From time to time clients get disconnected - can this happen because player does nothing for some amount of time?
What can be the reasons for the disconnect?

thanks,
Slav

Comments

  • dreamora
    Options
    No, doing nothing wouldn't lead to a disconnect

    But if you didn't mark your player as running in background and he makes the window inactive / makes the webplayer inactive, that can cause it cause he simply will not process any networking anymore and in consequence not send the 'I'm still alive' ping message or anything, making the connection timeout
  • gnoblin
    Options
    yeah, I know about runInBackground thing :)
  • dreamora
    Options
    then the alternative is that you send to much data (large data blobs), that gets you kicked out too in case of LoadBalancing instance or cloud
  • Tobias
    Options
    You could get disconnected when you send too much (many many PhotonViews or some that generate a lot of data), receive too much (long running room with lots of instantiates and buffered RPCs) or if you prevent the engine from calling Update (which is needed to call networkingPeer.SendOoutgoingCommands).

    A common scenario for the "Update not being called" is a bad framerate or when loading scenes. There is a "workaround" for loading scenes:
            // Temporary disable processing of futher network messages
            PhotonNetwork.isMessageQueueRunning = false;
            Application.LoadLevel(Application.loadedLevelName);