From 3d019323e822c7c051e54ff9ff6b6c138566e0fe Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 4 Sep 2019 11:01:27 +0100 Subject: [PATCH] Cache assets even in cases where the upload fails. That helps in asset upload debugging because the asset can be examined --- .../Connectors/Asset/AssetServicesConnector.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs index b12ea62efc..1bcc368ca8 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs @@ -539,11 +539,11 @@ namespace OpenSim.Services.Connectors // SynchronousRestObjectRequester returns somethins that is not an empty string asset.ID = newID; - - if (m_Cache != null) - m_Cache.Cache(asset); } } + if (m_Cache != null) + m_Cache.Cache(asset); + return asset.ID; } @@ -573,8 +573,8 @@ namespace OpenSim.Services.Connectors if (newID == null || newID == String.Empty || newID == stringUUIDZero) { if(nextRetryLevel >= MAXSENDRETRIESLEN) - m_log.WarnFormat("[Assets] Upload giveup after several retries id: {0} type {1}", - asset.ID.ToString(), asset.Type.ToString()); + m_log.WarnFormat("[Assets] Giving up on uploading after {2} retries id: {0} type {1}", + asset.ID.ToString(), asset.Type.ToString(), MAXSENDRETRIESLEN); else { lock(m_sendRetries) @@ -596,11 +596,11 @@ namespace OpenSim.Services.Connectors if (newID != asset.ID) { asset.ID = newID; - - if (m_Cache != null) - m_Cache.Cache(asset); } } + + if (m_Cache != null) + m_Cache.Cache(asset); } public bool UpdateContent(string id, byte[] data)