From 425a7656ed7c2428d09643e7bff9613f29784015 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Tue, 18 Dec 2007 01:38:06 +0000 Subject: [PATCH] * Removed the ObjectDisposed error. --- OpenSim/Region/ClientStack/UDPServer.cs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/ClientStack/UDPServer.cs b/OpenSim/Region/ClientStack/UDPServer.cs index 2b2269e23a..64381b446d 100644 --- a/OpenSim/Region/ClientStack/UDPServer.cs +++ b/OpenSim/Region/ClientStack/UDPServer.cs @@ -146,6 +146,14 @@ namespace OpenSim.Region.ClientStack } break; default: + try + { + CloseEndPoint(epSender); + } + catch (System.Exception) + { + //MainLog.Instance.Verbose("UDPSERVER", a.ToString()); + } // Here's some reference code! :D // Shutdown and restart the UDP listener! hehe // Shiny @@ -158,9 +166,9 @@ namespace OpenSim.Region.ClientStack return; } - catch (System.ObjectDisposedException e) + catch (System.ObjectDisposedException) { - MainLog.Instance.Debug("UDPSERVER", e.ToString()); + //MainLog.Instance.Debug("UDPSERVER", e.ToString()); return; } @@ -170,9 +178,9 @@ namespace OpenSim.Region.ClientStack { packet = Packet.BuildPacket(RecvBuffer, ref packetEnd, ZeroBuffer); } - catch(Exception e) + catch(Exception) { - MainLog.Instance.Debug("UDPSERVER", e.ToString()); + //MainLog.Instance.Debug("UDPSERVER", e.ToString()); } // do we already have a circuit for this endpoint