Reconnecting on mobile after backgrounding

Hello!
I'm trying to catch the situation of our game getting foregrounded after some time in the background and reconnecting to master (and possibly game server). At the moment, in Unity, I add the hook OnApplicationPause to a monobehavior and check we are unpausing. This triggers as normal, but when I check the LoadBalancingClient.IsConnectedAndReady it returns true regardless of the actual state. Not until I actually try to send data or trigger an API call do I get a 'peerstate: disconnected' error. At this point the boolean IsConnectedAndReady now reflects the true state of the connection.

What should I do to be able to query connectivity?
Sign In or Register to comment.