diff options
author | UbitUmarov | 2016-07-11 12:05:47 +0100 |
---|---|---|
committer | UbitUmarov | 2016-07-11 12:05:47 +0100 |
commit | 79fb13c95c7a752c44f3d6304788f0fc61f3414a (patch) | |
tree | 8fff715c00e5b131fa0535c9a991ce99fc5ccd99 /OpenSim | |
parent | fix ObjectPropertiesFamilyPacket LastOwnerID (diff) | |
download | opensim-SC_OLD-79fb13c95c7a752c44f3d6304788f0fc61f3414a.zip opensim-SC_OLD-79fb13c95c7a752c44f3d6304788f0fc61f3414a.tar.gz opensim-SC_OLD-79fb13c95c7a752c44f3d6304788f0fc61f3414a.tar.bz2 opensim-SC_OLD-79fb13c95c7a752c44f3d6304788f0fc61f3414a.tar.xz |
reduce xfer burst if we are busy
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs b/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs index 437cbcd..41ce860 100644 --- a/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs +++ b/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs | |||
@@ -266,8 +266,11 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer | |||
266 | if (!Transfers.ContainsKey(xferID)) | 266 | if (!Transfers.ContainsKey(xferID)) |
267 | { | 267 | { |
268 | byte[] fileData = NewFiles[fileName].Data; | 268 | byte[] fileData = NewFiles[fileName].Data; |
269 | int burstSize = remoteClient.GetAgentThrottleSilent((int)ThrottleOutPacketType.Asset) >> 11; | ||
270 | if(Transfers.Count > 1) | ||
271 | burstSize /= Transfers.Count; | ||
269 | XferDownLoad transaction = | 272 | XferDownLoad transaction = |
270 | new XferDownLoad(fileName, fileData, xferID, remoteClient); | 273 | new XferDownLoad(fileName, fileData, xferID, remoteClient, burstSize); |
271 | 274 | ||
272 | Transfers.Add(xferID, transaction); | 275 | Transfers.Add(xferID, transaction); |
273 | 276 | ||
@@ -326,12 +329,13 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer | |||
326 | private int burstSize; | 329 | private int burstSize; |
327 | private int retries = 0; | 330 | private int retries = 0; |
328 | 331 | ||
329 | public XferDownLoad(string fileName, byte[] data, ulong xferID, IClientAPI client) | 332 | public XferDownLoad(string fileName, byte[] data, ulong xferID, IClientAPI client, int burstsz) |
330 | { | 333 | { |
331 | FileName = fileName; | 334 | FileName = fileName; |
332 | Data = data; | 335 | Data = data; |
333 | XferID = xferID; | 336 | XferID = xferID; |
334 | Client = client; | 337 | Client = client; |
338 | burstSize = burstsz; | ||
335 | } | 339 | } |
336 | 340 | ||
337 | public XferDownLoad() | 341 | public XferDownLoad() |
@@ -371,7 +375,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer | |||
371 | lastBytes = 1024; | 375 | lastBytes = 1024; |
372 | LastPacket--; | 376 | LastPacket--; |
373 | } | 377 | } |
374 | burstSize = Client.GetAgentThrottleSilent((int)ThrottleOutPacketType.Asset) >> 11; | 378 | |
375 | } | 379 | } |
376 | 380 | ||
377 | lastAckPacket = -1; | 381 | lastAckPacket = -1; |