When I put an iOS app in the background, Unity sends OnApplicationPause with the argument true.
Whenever I bring the app back to the foreground, I get the OnApplicationPause call with the argument false. When I print out various things about whether the client isConnected, it seems fine. However, immediately after, I get:
UNet Client Disconnect Error: Timeout
UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate()
But I’m not seeing any of: OnClientError, OnClientDisconnect, or OnClientNotReady.
Here is my log from XCode when bringing the application back into the foreground:
Log: connection {1} has been
disconnected by timeout; address
{10.101.68.98:7777}
→ applicationWillEnterForeground()
→ applicationDidBecomeActive() OurNetworkManager.OnApplicationPause:
False (Filename:
/Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp
Line: 64)OurNetworkManager.OnApplicationPause:
isNetworkActive: True runInBackground:
True isClientConnected: True
(Filename:
/Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp
Line: 64)UNet Client Disconnect Error: Timeout
UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate()
(Filename:
/Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp
Line: 64)