Slow down the packet receiving code again after new reports of thread storms.
parent
77e48a6725
commit
23586b69a1
|
@ -198,9 +198,6 @@ namespace OpenMetaverse
|
||||||
// to AsyncBeginReceive
|
// to AsyncBeginReceive
|
||||||
if (!m_shutdownFlag)
|
if (!m_shutdownFlag)
|
||||||
{
|
{
|
||||||
// start another receive - this keeps the server going!
|
|
||||||
AsyncBeginReceive();
|
|
||||||
|
|
||||||
// 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
|
||||||
//WrappedObject<UDPPacketBuffer> wrappedBuffer = (WrappedObject<UDPPacketBuffer>)iar.AsyncState;
|
//WrappedObject<UDPPacketBuffer> wrappedBuffer = (WrappedObject<UDPPacketBuffer>)iar.AsyncState;
|
||||||
|
@ -219,7 +216,14 @@ namespace OpenMetaverse
|
||||||
}
|
}
|
||||||
catch (SocketException) { }
|
catch (SocketException) { }
|
||||||
catch (ObjectDisposedException) { }
|
catch (ObjectDisposedException) { }
|
||||||
//finally { wrappedBuffer.Dispose(); }
|
finally
|
||||||
|
{
|
||||||
|
// wrappedBuffer.Dispose();
|
||||||
|
|
||||||
|
// start another receive - this keeps the server going!
|
||||||
|
AsyncBeginReceive();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue