Timeout/Disconnects

pjamestx
edited July 2010 in DotNet
Howdy-
I'm working on a Unity/Photon project, and I seem to be having some issues with slower computers attempting to change scenes. Most of our computers have no problems transitioning, but one of the slower test machines will occasionally get disconnected in the process.

On the server side (C#) I'm seeing the LiteApplication.HandleDisconnect event firing, and on the client side (Unity/C#), the nPeerReturn function is getting a returnCode of NPeerReturnCodes.RC_RT_DISCONNECT. This is with Photon 1.1.3, I'm in the process of figuring out how to upgrade it, but I'd really like to deal with this issue before I rip it all apart for the upgrade.

Is there a timeout I can adjust? Or do I need to handle the disconnect event on the client side and have it attempt to reconnect there? I'm very new to Photon, sorry if I've missed something obvious :) Thanks.

Comments

  • Photon 1 doesn't support disconnect timeout changes (Photon 2 does now).
    You will have to reconnect after you disconnect.
    I wonder though why exactly the client disconnects, it probably means that your frame rate freezes for several seconds?
  • Yes, it appears that on slower computers our Unity project is causing the browser to become unresponsive for a second or two, and I'm guessing that's causing it to miss some Photon messages. I've cobbled in an automatic reconnect attempt which will get us by for now, thanks for the support.