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,41 +2301,35 @@ 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;
try m_currentIncomingClient = client;
{
// Process this packet try
client.ProcessInPacket(packet); {
} // Process this packet
catch (ThreadAbortException) client.ProcessInPacket(packet);
{ }
// If something is trying to abort the packet processing thread, take that as a hint that it's time to shut down catch(ThreadAbortException)
m_log.Info("[LLUDPSERVER]: Caught a thread abort, shutting down the LLUDP server"); {
Stop(); // 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");
catch (Exception e) Stop();
{ }
// Don't let a failure in an individual client thread crash the whole sim. catch(Exception e)
m_log.Error( {
string.Format( // Don't let a failure in an individual client thread crash the whole sim.
"[LLUDPSERVER]: Client packet handler for {0} for packet {1} threw ", m_log.Error(
client.Name, packet.Type), string.Format(
e); "[LLUDPSERVER]: Client packet handler for {0} for packet {1} threw ",
} client.Name,packet.Type),
finally e);
{ }
m_currentIncomingClient = null; finally
} {
// } 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++;
} }