示例#1
0
     /// <summary>
     /// Deactivates the client if we don't receive any packets within a certain amount of time (default 60 seconds).
     /// </summary>
     /// <remarks>
     /// If a connection is active then we will always receive packets even if nothing else is happening, due to
     /// regular client pings.
     /// </remarks>
     /// <param name='client'></param>
     private void DeactivateClientDueToTimeout(LLClientView client)
     {
         lock (client.CloseSyncLock)
         {
             m_log.WarnFormat(
                 "[LLUDPSERVER]: Ack timeout, disconnecting {0} agent for {1} in {2}",
                 client.SceneAgent.IsChildAgent ? "child" : "root", client.Name, m_scene.RegionInfo.RegionName);
 
             StatsManager.SimExtraStats.AddAbnormalClientThreadTermination();
 
             if (!client.SceneAgent.IsChildAgent)
                  client.Kick("Simulator logged you out due to connection timeout");
 
             client.CloseWithoutChecks();
         }
     }