dont try to process packets for deleted clients

LSLKeyTest
UbitUmarov 2015-12-09 22:57:13 +00:00
parent bbe55df6c6
commit bdab95f1d2
1 changed files with 28 additions and 34 deletions

View File

@ -2301,8 +2301,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
Packet packet = incomingPacket.Packet; Packet packet = incomingPacket.Packet;
LLClientView client = incomingPacket.Client; LLClientView client = incomingPacket.Client;
// if (client.IsActive) if(!client.IsActive)
// { return;
m_currentIncomingClient = client; m_currentIncomingClient = client;
try try
@ -2310,32 +2311,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// Process this packet // Process this packet
client.ProcessInPacket(packet); client.ProcessInPacket(packet);
} }
catch (ThreadAbortException) catch(ThreadAbortException)
{ {
// If something is trying to abort the packet processing thread, take that as a hint that it's time to shut down // If something is trying to abort the packet processing thread, take that as a hint that it's time to shut down
m_log.Info("[LLUDPSERVER]: Caught a thread abort, shutting down the LLUDP server"); m_log.Info("[LLUDPSERVER]: Caught a thread abort, shutting down the LLUDP server");
Stop(); Stop();
} }
catch (Exception e) catch(Exception e)
{ {
// Don't let a failure in an individual client thread crash the whole sim. // Don't let a failure in an individual client thread crash the whole sim.
m_log.Error( m_log.Error(
string.Format( string.Format(
"[LLUDPSERVER]: Client packet handler for {0} for packet {1} threw ", "[LLUDPSERVER]: Client packet handler for {0} for packet {1} threw ",
client.Name, packet.Type), client.Name,packet.Type),
e); e);
} }
finally finally
{ {
m_currentIncomingClient = null; m_currentIncomingClient = null;
} }
// }
// else
// {
// m_log.DebugFormat(
// "[LLUDPSERVER]: Dropped incoming {0} for dead client {1} in {2}",
// packet.Type, client.Name, m_scene.RegionInfo.RegionName);
// }
IncomingPacketsProcessed++; IncomingPacketsProcessed++;
} }