aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/ClientStack/ClientView.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index 2cd7711..75c69c2 100644
--- a/OpenSim/Region/ClientStack/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -246,6 +246,8 @@ namespace OpenSim.Region.ClientStack
246 246
247 protected virtual void ClientLoop() 247 protected virtual void ClientLoop()
248 { 248 {
249 QueItem lastPacket = null;
250
249 MainLog.Instance.Verbose("CLIENT", "Entered loop"); 251 MainLog.Instance.Verbose("CLIENT", "Entered loop");
250 while (true) 252 while (true)
251 { 253 {
@@ -266,7 +268,13 @@ namespace OpenSim.Region.ClientStack
266 if (throttleSentPeriod > throttleOutbound) 268 if (throttleSentPeriod > throttleOutbound)
267 { 269 {
268 PacketQueue.Enqueue(nextPacket); 270 PacketQueue.Enqueue(nextPacket);
269 Thread.Sleep(100); // Wait a little while, should prevent a CPU spike during high transmission periods 271
272 if (lastPacket == nextPacket)
273 {
274 Thread.Sleep(100); // Wait a little while if this was the last packet we saw
275 }
276
277 lastPacket = nextPacket;
270 } 278 }
271 else 279 else
272 { 280 {