Unity freezes when TCP connection lost

Hi guys,

We keep having an issue, where if we use TCP photon connection, once a disconnection is identified, unity freezes and refreshes only once the PeerStatusCallBack is called (after the unity gets back from stalling).
If we connect with UDP, this does not happen. That's the only change in the client when changing protocols.

(We are using Photon 2.6)

What can cause this?

Edit:
Here is the exception photon generates:
---->ERROR: Listener debug returned: Receiving failed. Exception: System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host.

at System.Net.Sockets.Socket.Receive (System.Byte[] buffer, Int32 offset, Int32 size, SocketFlags flags) [0x00000] in <filename unknown>:0
at ExitGames.Client.Photon.TConnect.Run () [0x00000] in <filename unknown>:0
UnityEngine.Debug:LogError(Object)
PhotonListener:DebugReturn(DebugLevel, String) (at Assets/Scripts/NewScripts/ConnectionService/PhotonListener.cs:42)
ExitGames.Client.Photon.<>c__DisplayClass2:<EnqueueDebugReturn>b__0()
ExitGames.Client.Photon.TPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:Service()

Comments

  • Ow. Photon 2.6?
    Can you update to 3, please? This might look like a lot of work with just little gain but the latest Photon 3 SDKs are much more stable than Photon 2.x ever got. This is true for client and server.

    This issue should be resolved then, too, and it's unlikely we will port it back to the older versions.
  • Thanks.

    We will definitely consider that.
Sign In or Register to comment.