unexpected msgType 5 since 11.09.2020
Options
Hello,
since last Friday my players experiencing unexpected disconnects caused this log:
09-15 07:45:17.503 12245 12308 E Unity : unexpected msgType 5
09-15 07:45:17.503 12245 12308 E Unity : ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
09-15 07:45:17.503 12245 12308 E Unity : ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
09-15 07:45:17.503 12245 12308 E Unity : PhotonHandler:Update()
since last Friday my players experiencing unexpected disconnects caused this log:
09-15 07:45:17.503 12245 12308 E Unity : unexpected msgType 5
09-15 07:45:17.503 12245 12308 E Unity : ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
09-15 07:45:17.503 12245 12308 E Unity : ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
09-15 07:45:17.503 12245 12308 E Unity : PhotonHandler:Update()
0
Comments
-
Disconnect reason after this log is DisconnectByServerLogic0
-
hi, @Eldirfar
this is something new from server side. when client does something wrong from server point of view it is disconnected. before it is disconnected server sends an explanation. this explanation is new message type and it is not supported by old clients. You only see wrong message type.
everything else is same.
best,
ilya
0 -
hi, @Eldirfar
msgType 5 is 'DisconnectMessage' it contains inside error code, error message and optionally some parameters as Dictionary<byte, object>
when client gets it, it (client) have to disconnect from the server. In fact, the connection is already in special state when all incoming stuff from client is ignored. Client may only get some thing from the server. and one more important thing is that peer is already scheduled for disconnect.
so, we do it next way. We schedule peer to disconnect in, lets say, 5 seconds and send disconnect message to it. 5 seconds is usually enough to get that message on client. But because client does not know how to react on it yet, it stays connected. And next message that it gets is DisconnectByServerLogic, because it was disconnected by server code.
Why server may disconnect?
Usually this happens because of different errors. Usually those errors are in data. Either in raw data and we get error during deserialization, or in deserialized data, e.g. OperationRequests, or in Logic. I mean for instance you try to join game that is already full.
in order to see whether you really started to have more disconnects than usual, look into your counters. Total numbers should be same.
@Tobias and @Kaiserludi, could you answer when it is planed to add DisconnectMessage to client libs?
best,
ilya0