Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

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...