Search Unity

UNet "Disconnect Timeout" doesn't drop paused Android client connection.

Discussion in 'UNet' started by forcepusher, Apr 17, 2016.

  1. forcepusher

    forcepusher

    Joined:
    Jun 25, 2012
    Posts:
    227
    That happens even if "Run in background" is set to false in both NetworkManager and player settings. Is that normal or something ? I want inactive clients to disconnect so they won't cause this:

    ss+(2016-04-17+at+03.52.20).png

    A couple of seconds after I press the "home" button on Android to get out of the game, I see this error message spam on server. Also the inactive player is just going to stay there until the application is manually terminated.
    I had to manually implement "Ping" RPC and "PingResponse" Command that help dropping connection if client doesn't respond for too long.
     
    Last edited: May 25, 2016
  2. mojtaba64

    mojtaba64

    Joined:
    Aug 3, 2010
    Posts:
    56
    Hi,
    That's my problem too, I think the only way to do it is what said, implementing "Ping" RPC and "PingResponse" Command...