About disconnection on mobile

Options
We are using PUN 2 currently and everything else is fine except for one problem.
On PC, when player loses connection, we receive "OnDisconnected" ;However, on mobile device (such as fly mode or disconnecting wifi), we do not receive anything. Is there a way to detect disconnection from mobile device?

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @dragon2222,

    Thank you for choosing Photon!

    I think this question has been asked before on the forum.
    Could you make sure that the OnDisconnected callback is not triggered after client timeout which is 10 seconds?

    If you want to detect timeouts earlier:

    - watch the timestamp of the last time the client received something from the server and disconnect it explicitly, see here and here
    - add native plugins to detect changes in the network config and react to those, e.g. fly mode, disable WiFI etc.