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.
varregion
Justin Clark-Casey (justincc) 2013-09-25 00:02:17 +01:00
parent 8de5c29e2c
commit f384a6291e
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);
}
}
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)
AsyncBeginReceive();
try
{
// get the buffer that was created in AsyncBeginReceive
// this is the received data
UDPPacketBuffer buffer = (UDPPacketBuffer)iar.AsyncState;
try
{
int startTick = Util.EnvironmentTickCount();
// get the length of data actually read from the socket, store it with the
@ -345,8 +354,24 @@ namespace OpenMetaverse
m_currentReceiveTimeSamples++;
}
}
catch (SocketException) { }
catch (ObjectDisposedException) { }
catch (SocketException se)
{
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
{
// if (UsePools)