OnDisconnectedFromPhoton not called after switching airplane mode on in IOS
Options
I'm testing a disconnection scenario. I run the game on IOS, and switch the device airplane mode ON (after i'm sire that i'm in lobby). I've also tried killing the wifi router. But the OnDisconnectedFromPhoton is not fired. It works ok on android and in the unity emulator.
help anyone?
Edit: I've added regular PhotonNetwork.GetPing() calls every 5 seconds. The return value changes slightly each call, but when i turn on the airplane mode, it freezes around the last value, but still returns like everything is normal
help anyone?
Edit: I've added regular PhotonNetwork.GetPing() calls every 5 seconds. The return value changes slightly each call, but when i turn on the airplane mode, it freezes around the last value, but still returns like everything is normal
0
Answers
-
Hi @ManEatingSheep,
Thank you for choosing Photon!
Implement the connection failure callback and see if it's triggered:OnConnectionFail (DisconnectCause cause)
0 -
i would, but i'm also looking for other events like "OnFailedToConnectToPhoton", the only thing they have in common, is they are all followed by "OnDisconnectedFromPhoton". i'l try it, for test purposes, but it's a problematic solution in my case, as it will eventually mess up the state machine of the reconnection mechanism.0
-
No luck. @JohnTube. the OnConnectionFail event fires late as well
0 -
event fires late as wellSo you are saying both callbacks are triggered but after some delay.
That is expected then due to the 10 seconds client timeout.0 -
The delay is far greater then 10 seconds. In fact it's usually fires only when the network is back on. even minutes laterJohnTube said:event fires late as wellSo you are saying both callbacks are triggered but after some delay.
That is expected then due to the 10 seconds client timeout.
0 -
Does the app lose focus?
please implement to see what happens exactly:void OnApplicationPause(bool paused) { Debug.LogFormat("OnApplicationPause({0})", paused); } void OnApplicationFocus(bool focused) { Debug.LogFormat("OnApplicationFocus({0})", focused); }
0