diff --git a/OpenSim/Framework/Communications/RestClient.cs b/OpenSim/Framework/Communications/RestClient.cs index de34250b7a..ce36fbf52d 100644 --- a/OpenSim/Framework/Communications/RestClient.cs +++ b/OpenSim/Framework/Communications/RestClient.cs @@ -326,6 +326,9 @@ namespace OpenSim.Framework.Communications m_log.Debug(e.ToString()); } + if (_response != null) + _response.Close(); + return null; } @@ -390,6 +393,9 @@ namespace OpenSim.Framework.Communications _response = (HttpWebResponse) _request.GetResponse(); + if (_response != null) + _response.Close(); + // IAsyncResult responseAsyncResult = _request.BeginGetResponse(new AsyncCallback(ResponseIsReadyDelegate), _request); // TODO! Implement timeout, without killing the server