Added try/catches in the outgoing packet handler to match the one in the incoming packet handler

prioritization
John Hurliman 2009-10-20 12:43:09 -07:00
parent 99abe885c8
commit d1ab11dc2a
1 changed files with 59 additions and 45 deletions

View File

@ -775,6 +775,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
int elapsed500MS = 0; int elapsed500MS = 0;
while (base.IsRunning) while (base.IsRunning)
{
try
{ {
bool resendUnacked = false; bool resendUnacked = false;
bool sendAcks = false; bool sendAcks = false;
@ -806,6 +808,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_scene.ClientManager.ForEachSync( m_scene.ClientManager.ForEachSync(
delegate(IClientAPI client) delegate(IClientAPI client)
{
try
{ {
if (client is LLClientView) if (client is LLClientView)
{ {
@ -827,11 +831,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
} }
} }
catch (Exception ex)
{
m_log.Error("[LLUDPSERVER]: OutgoingPacketHandler iteration for " + client.Name + " threw an exception: " + ex.Message, ex);
}
}
); );
if (!packetSent) if (!packetSent)
Thread.Sleep(20); Thread.Sleep(20);
} }
catch (Exception ex)
{
m_log.Error("[LLUDPSERVER]: OutgoingPacketHandler loop threw an exception: " + ex.Message, ex);
}
}
} }
private void ProcessInPacket(object state) private void ProcessInPacket(object state)