aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAdam Frisby2007-11-09 02:26:26 +0000
committerAdam Frisby2007-11-09 02:26:26 +0000
commit7861390f72bfccb2231e126636afc2565d7f8d02 (patch)
treec5f6062f935cef662d55fedcb069cbaa46a9c14d
parent* Tweaked throttle sizes. Throttle is now 256kbps outbound per client. (diff)
downloadopensim-SC-7861390f72bfccb2231e126636afc2565d7f8d02.zip
opensim-SC-7861390f72bfccb2231e126636afc2565d7f8d02.tar.gz
opensim-SC-7861390f72bfccb2231e126636afc2565d7f8d02.tar.bz2
opensim-SC-7861390f72bfccb2231e126636afc2565d7f8d02.tar.xz
* Tweaked how the throttle works.
-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 {