diff options
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 3d6c6a8..672ed3c 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |||
@@ -2022,26 +2022,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2022 | Scene.ThreadAlive(1); | 2022 | Scene.ThreadAlive(1); |
2023 | try | 2023 | try |
2024 | { | 2024 | { |
2025 | /* | ||
2026 | // HACK: This is a test to try and rate limit packet handling on Mono. | ||
2027 | // If it works, a more elegant solution can be devised | ||
2028 | if (Util.FireAndForgetCount() < 2) | ||
2029 | { | ||
2030 | //m_log.Debug("[LLUDPSERVER]: Incoming packet handler is sleeping"); | ||
2031 | Thread.Sleep(30); | ||
2032 | } | ||
2033 | */ | ||
2034 | incomingPacket = packetInbox.Dequeue(250); | 2025 | incomingPacket = packetInbox.Dequeue(250); |
2035 | 2026 | ||
2036 | if (incomingPacket != null) | 2027 | if (incomingPacket != null && IsRunningInbound) |
2037 | { | 2028 | { |
2038 | ProcessInPacket(incomingPacket);//, incomingPacket); Util.FireAndForget(ProcessInPacket, incomingPacket); | 2029 | ProcessInPacket(incomingPacket); |
2039 | 2030 | ||
2040 | if (UsePools) | 2031 | if (UsePools) |
2041 | m_incomingPacketPool.ReturnObject(incomingPacket); | 2032 | m_incomingPacketPool.ReturnObject(incomingPacket); |
2042 | } | ||
2043 | 2033 | ||
2044 | incomingPacket = null; | 2034 | incomingPacket = null; |
2035 | } | ||
2045 | } | 2036 | } |
2046 | catch(Exception ex) | 2037 | catch(Exception ex) |
2047 | { | 2038 | { |