Instead of swallowing any socket begin/end receive exceptions, log them for debugging purposes.

This may reveal why on some teleports with current code, the UseCircuitCode message gets through but CompleteMovement disappears into the ether.
0.7.6-extended
Justin Clark-Casey (justincc) 2013-09-25 00:02:17 +01:00
parent 2b392a09b1
commit 516ab5d8c6
1 changed files with 32 additions and 7 deletions

View File

@ -295,7 +295,16 @@ namespace OpenMetaverse
m_log.Warn("[UDPBASE]: Salvaged the UDP listener on port " + m_udpPort); m_log.Warn("[UDPBASE]: Salvaged the UDP listener on port " + m_udpPort);
} }
} }
catch (ObjectDisposedException) { } catch (ObjectDisposedException e)
{
m_log.Error(
string.Format("[UDPBASE]: Error processing UDP begin receive {0}. Exception ", UdpReceives), e);
}
catch (Exception e)
{
m_log.Error(
string.Format("[UDPBASE]: Error processing UDP begin receive {0}. Exception ", UdpReceives), e);
}
} }
} }
@ -312,12 +321,12 @@ namespace OpenMetaverse
if (m_asyncPacketHandling) if (m_asyncPacketHandling)
AsyncBeginReceive(); AsyncBeginReceive();
try
{
// get the buffer that was created in AsyncBeginReceive // get the buffer that was created in AsyncBeginReceive
// this is the received data // this is the received data
UDPPacketBuffer buffer = (UDPPacketBuffer)iar.AsyncState; UDPPacketBuffer buffer = (UDPPacketBuffer)iar.AsyncState;
try
{
int startTick = Util.EnvironmentTickCount(); int startTick = Util.EnvironmentTickCount();
// get the length of data actually read from the socket, store it with the // get the length of data actually read from the socket, store it with the
@ -345,8 +354,24 @@ namespace OpenMetaverse
m_currentReceiveTimeSamples++; m_currentReceiveTimeSamples++;
} }
} }
catch (SocketException) { } catch (SocketException se)
catch (ObjectDisposedException) { } {
m_log.Error(
string.Format(
"[UDPBASE]: Error processing UDP end receive {0}, socket error code {1}. Exception ",
UdpReceives, se.ErrorCode),
se);
}
catch (ObjectDisposedException e)
{
m_log.Error(
string.Format("[UDPBASE]: Error processing UDP end receive {0}. Exception ", UdpReceives), e);
}
catch (Exception e)
{
m_log.Error(
string.Format("[UDPBASE]: Error processing UDP end receive {0}. Exception ", UdpReceives), e);
}
finally finally
{ {
// if (UsePools) // if (UsePools)