OnDisconnectedFromPhoton not called after switching airplane mode on in IOS

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

Answers

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited July 2017
    Hi @ManEatingSheep,

    Thank you for choosing Photon!

    Implement the connection failure callback and see if it's triggered:
    OnConnectionFail (DisconnectCause cause)
    
  • 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.
  • ManEatingSheep
    edited July 2017
    No luck. @JohnTube. the OnConnectionFail event fires late as well
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited July 2017
    event fires late as well
    So you are saying both callbacks are triggered but after some delay.
    That is expected then due to the 10 seconds client timeout.
  • JohnTube said:

    event fires late as well
    So you are saying both callbacks are triggered but after some delay.
    That is expected then due to the 10 seconds client timeout.
    The delay is far greater then 10 seconds. In fact it's usually fires only when the network is back on. even minutes later
  • JohnTube
    JohnTube ✭✭✭✭✭
    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);
    }