From 23586b69a16c75b8c7cc9a99d1a7693686285ff7 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 9 Oct 2009 12:17:55 +0100 Subject: Slow down the packet receiving code again after new reports of thread storms. --- OpenSim/Region/ClientStack/LindenUDP/OpenSimUDPBase.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/ClientStack/LindenUDP/OpenSimUDPBase.cs') diff --git a/OpenSim/Region/ClientStack/LindenUDP/OpenSimUDPBase.cs b/OpenSim/Region/ClientStack/LindenUDP/OpenSimUDPBase.cs index 9b1751d..e78a4fe 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/OpenSimUDPBase.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/OpenSimUDPBase.cs @@ -198,9 +198,6 @@ namespace OpenMetaverse // to AsyncBeginReceive if (!m_shutdownFlag) { - // start another receive - this keeps the server going! - AsyncBeginReceive(); - // get the buffer that was created in AsyncBeginReceive // this is the received data //WrappedObject wrappedBuffer = (WrappedObject)iar.AsyncState; @@ -219,7 +216,14 @@ namespace OpenMetaverse } catch (SocketException) { } catch (ObjectDisposedException) { } - //finally { wrappedBuffer.Dispose(); } + finally + { + // wrappedBuffer.Dispose(); + + // start another receive - this keeps the server going! + AsyncBeginReceive(); + } + } } -- cgit v1.1