diff --git a/OpenSim/Framework/Communications/GenericAsyncResult.cs b/OpenSim/Framework/Communications/GenericAsyncResult.cs
index efd2f43fef..8e3f62b40e 100644
--- a/OpenSim/Framework/Communications/GenericAsyncResult.cs
+++ b/OpenSim/Framework/Communications/GenericAsyncResult.cs
@@ -146,6 +146,7 @@ namespace OpenSim.Framework.Communications
// If the operation isn't done, wait for it
AsyncWaitHandle.WaitOne();
AsyncWaitHandle.Close();
+ m_waitHandle.Close();
m_waitHandle = null; // Allow early GC
}
diff --git a/OpenSim/Framework/Communications/RestClient.cs b/OpenSim/Framework/Communications/RestClient.cs
index d98f47d80b..a74169eb49 100644
--- a/OpenSim/Framework/Communications/RestClient.cs
+++ b/OpenSim/Framework/Communications/RestClient.cs
@@ -105,7 +105,7 @@ namespace OpenSim.Framework.Communications
///
/// This flag will help block the main synchroneous method, in case we run in synchroneous mode
///
- public static ManualResetEvent _allDone = new ManualResetEvent(false);
+ //public static ManualResetEvent _allDone = new ManualResetEvent(false);
///
/// Default time out period
@@ -282,12 +282,12 @@ namespace OpenSim.Framework.Communications
else
{
s.Close();
- _allDone.Set();
+ //_allDone.Set();
}
}
catch (Exception e)
{
- _allDone.Set();
+ //_allDone.Set();
_asyncException = e;
}
}
diff --git a/OpenSim/Framework/Parallel.cs b/OpenSim/Framework/Parallel.cs
index 74537ba460..6efdad022c 100644
--- a/OpenSim/Framework/Parallel.cs
+++ b/OpenSim/Framework/Parallel.cs
@@ -89,6 +89,7 @@ namespace OpenSim.Framework
}
threadFinishEvent.WaitOne();
+ threadFinishEvent.Close();
if (exception != null)
throw new Exception(exception.Message, exception);
@@ -148,6 +149,7 @@ namespace OpenSim.Framework
}
threadFinishEvent.WaitOne();
+ threadFinishEvent.Close();
if (exception != null)
throw new Exception(exception.Message, exception);
@@ -199,6 +201,7 @@ namespace OpenSim.Framework
}
threadFinishEvent.WaitOne();
+ threadFinishEvent.Close();
if (exception != null)
throw new Exception(exception.Message, exception);
diff --git a/OpenSim/Region/Application/OpenSimBackground.cs b/OpenSim/Region/Application/OpenSimBackground.cs
index ac5e2412e2..008c6b07b5 100644
--- a/OpenSim/Region/Application/OpenSimBackground.cs
+++ b/OpenSim/Region/Application/OpenSimBackground.cs
@@ -58,6 +58,7 @@ namespace OpenSim
m_clientServers.Count.ToString(), m_clientServers.Count > 1 ? "s" : "");
WorldHasComeToAnEnd.WaitOne();
+ WorldHasComeToAnEnd.Close();
}
///
diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
index b885420081..9b565ed85b 100644
--- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
public string body;
public int responseCode;
public string responseBody;
- public ManualResetEvent ev;
+ //public ManualResetEvent ev;
public bool requestDone;
public int startTime;
public string uri;
@@ -456,7 +456,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
requestData.headers["x-query-string"] = queryString;
requestData.headers["x-script-url"] = url.url;
- requestData.ev = new ManualResetEvent(false);
+ //requestData.ev = new ManualResetEvent(false);
lock (url.requests)
{
url.requests.Add(requestID, requestData);