@morteza You could adjust the socket timeouts to detect the disconnect more quickly but this has a few negative consequences:
- You’ll consume more CPU resource if you send more server-side socket heartbeats as well as more network IO resource.
- It means you’ll favour players who have better connections because slower connections tend not to manage lots of small messages (like socket heartbeats) well.
The reason our server defaults are set as they are by default is to balance connectivity for players across the world and be more tolerant to slower client connections. The tradeoff is yours of course because you can adjust these values (as we’ve made sure its all configurable).
When i minimize my game in my device, other player confront disconnection after 90 seconds
Another way to solve this problem as a client-side issue rather than server side is to just hook into the application focus lifecycle event in your game engine (like with Unity engine) and intentionally disconnect the socket when the game application loses focus. This will ensure that the other player will observe it immediately.
Hope this helps.