diff options
author | UbitUmarov | 2019-06-09 23:40:50 +0100 |
---|---|---|
committer | UbitUmarov | 2019-06-09 23:40:50 +0100 |
commit | 2cba0d676ec28d7b061bcb3a83069e6e50d95a5e (patch) | |
tree | 5321f1b689e039e15fb05c7e3df3a9ee7e540b8d /OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs | |
parent | reduce some useless array copies (diff) | |
download | opensim-SC-2cba0d676ec28d7b061bcb3a83069e6e50d95a5e.zip opensim-SC-2cba0d676ec28d7b061bcb3a83069e6e50d95a5e.tar.gz opensim-SC-2cba0d676ec28d7b061bcb3a83069e6e50d95a5e.tar.bz2 opensim-SC-2cba0d676ec28d7b061bcb3a83069e6e50d95a5e.tar.xz |
test...
Diffstat (limited to 'OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs b/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs index 94e8064..705d7ea 100644 --- a/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs +++ b/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs | |||
@@ -274,7 +274,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer | |||
274 | byte[] fileData = NewFiles[fileName].Data; | 274 | byte[] fileData = NewFiles[fileName].Data; |
275 | int burstSize = remoteClient.GetAgentThrottleSilent((int)ThrottleOutPacketType.Task) >> 10; | 275 | int burstSize = remoteClient.GetAgentThrottleSilent((int)ThrottleOutPacketType.Task) >> 10; |
276 | burstSize = burstSize * (remoteClient.PingTimeMS + 50); | 276 | burstSize = burstSize * (remoteClient.PingTimeMS + 50); |
277 | burstSize >>= 9; // ping is ms, 2 round trips | 277 | burstSize /= 1000; // ping is ms |
278 | XferDownLoad transaction = | 278 | XferDownLoad transaction = |
279 | new XferDownLoad(fileName, fileData, xferID, remoteClient, burstSize); | 279 | new XferDownLoad(fileName, fileData, xferID, remoteClient, burstSize); |
280 | 280 | ||
@@ -333,7 +333,6 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer | |||
333 | private int lastSentPacket; | 333 | private int lastSentPacket; |
334 | private int lastAckPacket; | 334 | private int lastAckPacket; |
335 | private int burstSize; // additional packets, so can be zero | 335 | private int burstSize; // additional packets, so can be zero |
336 | private int retries = 0; | ||
337 | 336 | ||
338 | public XferDownLoad(string fileName, byte[] data, ulong xferID, IClientAPI client, int burstsz) | 337 | public XferDownLoad(string fileName, byte[] data, ulong xferID, IClientAPI client, int burstsz) |
339 | { | 338 | { |
@@ -461,11 +460,11 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer | |||
461 | if(!isDeleted) | 460 | if(!isDeleted) |
462 | { | 461 | { |
463 | double timeMS = now - lastsendTimeMS; | 462 | double timeMS = now - lastsendTimeMS; |
464 | if(timeMS > 60000.0) | 463 | if(timeMS > 90000.0) |
465 | done(); | 464 | done(); |
466 | else if(timeMS > 3500.0 && retries++ < 3) | 465 | else if(timeMS > 3500.0) |
467 | { | 466 | { |
468 | burstSize >>= 1; | 467 | burstSize = 0; // cancel burst mode |
469 | SendBurst(now); | 468 | SendBurst(now); |
470 | } | 469 | } |
471 | } | 470 | } |