Some Questions about SocketException 10054 thrown from ExitGames.Client.Photon.SocketTcpAsync.

edited December 2019 in Photon Voice

The Exception message:

2019-12-18 14:10:39.761 10511-10543/? E/Unity: SocketTcpAsync.EndReceive SocketException. State: Connected. Server: '' ErrorCode: 10054 SocketErrorCode: ConnectionReset Message: Connection reset by peer System.Net.Sockets.SocketException (0x80004005): Connection reset by peer

   at System.Net.Sockets.Socket.EndReceive (System.IAsyncResult asyncResult) [0x00012] in <3845a180c26b4889bc2d47593a665814>:0 

   at ExitGames.Client.Photon.SocketTcpAsync.ReceiveAsync (System.IAsyncResult ar) [0x00023] in <e2387f9dc4784e52ba991612d3ef9d57>:0 

We cannot see relevant codes  about this exception ,but it may have some affects to our application, I have two questions as follows:

1. Is ExitGames.Client.Photon.SocketTcpAsync.ReceiveAsync executed in the Unity main thread?

2.Is this function included in a try catch sentence?




  • Hi @harlan,

    1. No. Since it's async. the socket uses a separate thread.
    2. Yes. That's why you see that exception being logged explicitly inside a try catch.

    The client should disconnect automatically after this exception with DisconnectCause.Exception.