diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 85270a6..54cafb2 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |||
@@ -806,8 +806,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
806 | } | 806 | } |
807 | 807 | ||
808 | PacketPool.Instance.ReturnPacket(packet); | 808 | PacketPool.Instance.ReturnPacket(packet); |
809 | m_dataPresentEvent.Set(); | ||
810 | |||
809 | } | 811 | } |
810 | 812 | ||
813 | private AutoResetEvent m_dataPresentEvent = new AutoResetEvent(false); | ||
814 | |||
811 | /// <summary> | 815 | /// <summary> |
812 | /// Start the process of sending a packet to the client. | 816 | /// Start the process of sending a packet to the client. |
813 | /// </summary> | 817 | /// </summary> |
@@ -1658,6 +1662,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1658 | // Action generic every round | 1662 | // Action generic every round |
1659 | Action<IClientAPI> clientPacketHandler = ClientOutgoingPacketHandler; | 1663 | Action<IClientAPI> clientPacketHandler = ClientOutgoingPacketHandler; |
1660 | 1664 | ||
1665 | // while (true) | ||
1661 | while (base.IsRunningOutbound) | 1666 | while (base.IsRunningOutbound) |
1662 | { | 1667 | { |
1663 | try | 1668 | try |
@@ -1718,8 +1723,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1718 | 1723 | ||
1719 | // If nothing was sent, sleep for the minimum amount of time before a | 1724 | // If nothing was sent, sleep for the minimum amount of time before a |
1720 | // token bucket could get more tokens | 1725 | // token bucket could get more tokens |
1721 | if (!m_packetSent) | 1726 | //if (!m_packetSent) |
1722 | Thread.Sleep((int)TickCountResolution); | 1727 | // Thread.Sleep((int)TickCountResolution); |
1728 | m_dataPresentEvent.WaitOne(100); | ||
1723 | 1729 | ||
1724 | Watchdog.UpdateThread(); | 1730 | Watchdog.UpdateThread(); |
1725 | } | 1731 | } |