diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs index 9d6d9ad..88a3026 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs | |||
@@ -52,6 +52,8 @@ namespace OpenSim.Services.Connectors | |||
52 | private int m_retryCounter; | 52 | private int m_retryCounter; |
53 | private Dictionary<int, List<AssetBase>> m_retryQueue = new Dictionary<int, List<AssetBase>>(); | 53 | private Dictionary<int, List<AssetBase>> m_retryQueue = new Dictionary<int, List<AssetBase>>(); |
54 | private System.Timers.Timer m_retryTimer; | 54 | private System.Timers.Timer m_retryTimer; |
55 | private int m_maxAssetRequestConcurrency = 30; | ||
56 | |||
55 | private delegate void AssetRetrievedEx(AssetBase asset); | 57 | private delegate void AssetRetrievedEx(AssetBase asset); |
56 | 58 | ||
57 | // Keeps track of concurrent requests for the same asset, so that it's only loaded once. | 59 | // Keeps track of concurrent requests for the same asset, so that it's only loaded once. |
@@ -80,6 +82,10 @@ namespace OpenSim.Services.Connectors | |||
80 | 82 | ||
81 | public virtual void Initialise(IConfigSource source) | 83 | public virtual void Initialise(IConfigSource source) |
82 | { | 84 | { |
85 | IConfig netconfig = source.Configs["Network"]; | ||
86 | if (netconfig != null) | ||
87 | m_maxAssetRequestConcurrency = netconfig.GetInt("MaxRequestConcurrency",m_maxAssetRequestConcurrency); | ||
88 | |||
83 | IConfig assetConfig = source.Configs["AssetService"]; | 89 | IConfig assetConfig = source.Configs["AssetService"]; |
84 | if (assetConfig == null) | 90 | if (assetConfig == null) |
85 | { | 91 | { |
@@ -204,7 +210,7 @@ namespace OpenSim.Services.Connectors | |||
204 | if (asset == null || asset.Data == null || asset.Data.Length == 0) | 210 | if (asset == null || asset.Data == null || asset.Data.Length == 0) |
205 | { | 211 | { |
206 | asset = SynchronousRestObjectRequester. | 212 | asset = SynchronousRestObjectRequester. |
207 | MakeRequest<int, AssetBase>("GET", uri, 0, 30); | 213 | MakeRequest<int, AssetBase>("GET", uri, 0, m_maxAssetRequestConcurrency); |
208 | 214 | ||
209 | if (m_Cache != null) | 215 | if (m_Cache != null) |
210 | m_Cache.Cache(asset); | 216 | m_Cache.Cache(asset); |
@@ -311,7 +317,7 @@ namespace OpenSim.Services.Connectors | |||
311 | h.Invoke(a); | 317 | h.Invoke(a); |
312 | if (handlers != null) | 318 | if (handlers != null) |
313 | handlers.Clear(); | 319 | handlers.Clear(); |
314 | }, 30); | 320 | }, m_maxAssetRequestConcurrency); |
315 | 321 | ||
316 | success = true; | 322 | success = true; |
317 | } | 323 | } |