From f384a6291e6b03b451dd3e3fec7667bc8f53c296 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 25 Sep 2013 00:02:17 +0100 Subject: 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. --- .../ClientStack/Linden/UDP/OpenSimUDPBase.cs | 39 ++++++++++++++++++---- 1 file changed, 32 insertions(+), 7 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs index d0ed7e8..88494be 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs @@ -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(); - // get the buffer that was created in AsyncBeginReceive - // this is the received data - UDPPacketBuffer buffer = (UDPPacketBuffer)iar.AsyncState; - try { + // get the buffer that was created in AsyncBeginReceive + // this is the received data + UDPPacketBuffer buffer = (UDPPacketBuffer)iar.AsyncState; + 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) -- cgit v1.1