From 67432fcbf2b9ad58e83eb55f789c28ffd9ab572b Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 26 Oct 2012 23:08:59 +0100 Subject: Fix "save iar" hanging permanently if the asset request phase times out. Unlike "save oar", this was happening on the same thread as the original request. The timeout happens on another so the original thread is never aborted. On "save oar" this leaves the thread hanging (still bad) but on "save iar" it left the console thread hanging. Temporary fix is to make "save iar" do asset request on a separate thread, like "save oar". Longer term fix will be to restructure asset save to use a ManualResetEvent rather than a separate timeout timer. --- .../Inventory/Archiver/InventoryArchiveWriteRequest.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs') diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index 6587ead..d13b4a0 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs @@ -337,11 +337,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver { m_log.DebugFormat("[INVENTORY ARCHIVER]: Saving {0} assets for items", m_assetUuids.Count); - new AssetsRequest( - new AssetsArchiver(m_archiveWriter), - m_assetUuids, m_scene.AssetService, - m_scene.UserAccountService, m_scene.RegionInfo.ScopeID, - options, ReceivedAllAssets).Execute(); + AssetsRequest ar + = new AssetsRequest( + new AssetsArchiver(m_archiveWriter), + m_assetUuids, m_scene.AssetService, + m_scene.UserAccountService, m_scene.RegionInfo.ScopeID, + options, ReceivedAllAssets); + + Util.FireAndForget(o => ar.Execute()); } else { -- cgit v1.1