Problem with deconnections

Options
Simpson
edited March 2013 in Photon Server
Hello,

We are developing a little game with Unity 3.5, nGUI and Photon.
We are having some troubles with deconnection. Every X seconds, we received those events :
[ERROR] Receiving failed. SocketException: ConnectionReset // (From DebugReturn)
OnStatusChanged // (Debug print at start of function)
DisconnectByServer // (From statusCode.ToString())
OnStatusChanged // (Debug print at start of function)
Disconnect // (From statusCode.ToString())

Then we don't know what to do. We didn't find any "auto-disconnect" in the doc or any reconnect function.
If we try to peer.Connect again, we would have to authenticate ourselves again, join game again etc etc.. This is not possible for us, sadly !

Can we get any help on this point? Maybe it's really a nooby question but..

Best regards,

P.S: Sorry for my english, not native language !

Comments

  • dreamora
    Options
    there is no auto disconnect.
    If you drop the server, may I ask if you ensure that you call photons service function in each update so it communicates with the server? Because if it does not send its keep alive messages, then the server will consider it 'gone' and drop the peer.
  • Yes, we are calling peer.Service() at each Update().

    This is really strange because we followed the "get started with photon" tutorial and we always had that bug =/
  • dreamora
    Options
    Do you send large packets?
    Thats the only other reason I know out of my head and experience that causes disconnects.
    Photon is opted for realtime networking, not large file transfers and alike and trying to send such datablobs will starve the line for the 'keep alive pings' and other calls which in the end will get you dropped too. The more limited the bandwidth is on the client upstream side or server side, the more likely that would hit.
  • The "DisconnectByServer" means that there was an exception on Photon (server side) - which happens, for example, if Photon receives invalid data from the client etc. - so basically a bug, yes. (Other disconnect types would be "disconnect by client", "timeout" etc. - those are expected and no bugs.)

    If you are using Photon Server (self-hosted): please have a look at the log files, as described in viewtopic.php?f=5&t=1913. There should be a log entry for each of these disconnects. Please post one.

    If you are using Photon Cloud: please drop me a PM with your application ID and I'll have a look.