diff options
author | Justin Clark-Casey (justincc) | 2012-10-26 23:08:59 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-10-26 23:08:59 +0100 |
commit | 67432fcbf2b9ad58e83eb55f789c28ffd9ab572b (patch) | |
tree | eab663b3788f973b25b5aa79722f218554ccf8a8 /OpenSim/Region/CoreModules/World | |
parent | minor: Make the error thrown logged when a simulator in grid mode is trying t... (diff) | |
download | opensim-SC_OLD-67432fcbf2b9ad58e83eb55f789c28ffd9ab572b.zip opensim-SC_OLD-67432fcbf2b9ad58e83eb55f789c28ffd9ab572b.tar.gz opensim-SC_OLD-67432fcbf2b9ad58e83eb55f789c28ffd9ab572b.tar.bz2 opensim-SC_OLD-67432fcbf2b9ad58e83eb55f789c28ffd9ab572b.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs index 5787279..103eb47 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs | |||
@@ -129,6 +129,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
129 | m_options = options; | 129 | m_options = options; |
130 | m_repliesRequired = uuids.Count; | 130 | m_repliesRequired = uuids.Count; |
131 | 131 | ||
132 | // FIXME: This is a really poor way of handling the timeout since it will always leave the original requesting thread | ||
133 | // hanging. Need to restructure so an original request thread waits for a ManualResetEvent on asset received | ||
134 | // so we can properly abort that thread. Or request all assets synchronously, though that would be a more | ||
135 | // radical change | ||
132 | m_requestCallbackTimer = new System.Timers.Timer(TIMEOUT); | 136 | m_requestCallbackTimer = new System.Timers.Timer(TIMEOUT); |
133 | m_requestCallbackTimer.AutoReset = false; | 137 | m_requestCallbackTimer.AutoReset = false; |
134 | m_requestCallbackTimer.Elapsed += new ElapsedEventHandler(OnRequestCallbackTimeout); | 138 | m_requestCallbackTimer.Elapsed += new ElapsedEventHandler(OnRequestCallbackTimeout); |