
Hey. I have a co-op title for mobile built on Statecast and the hosted Session service. When the player sends the app to the background (home screen, or switching to another app) and then returns to the match, I get this in the device log:
-> sessionWillEnterForeground()-> sessionDidBecomeActive()Received error message from Session: peer timed out due to inactivity.Session lease is invalid. See TransportDriver.GetSessionLeaseStatus and SessionConnecWebSocketInvalidStateException: WebSocket is not in open state.
I know about the 8 second lease rule1 in the Session docs. But my actual question is: what is the best way to hold the connection open while the app is parked in the background?
As far as I understand it, that is the case — and it is sort of expected. The player is sitting in the middle of a realtime match. You would not want them idle for more than a few seconds in a ranked lobby either. On desktop you are free to allow …



