add some _response.close. RestClient still looks bad. It should be a

proper IDisposable object.
avinationmerge
UbitUmarov 2014-09-17 16:19:00 +01:00
parent 9bf3e2a257
commit df389dceb8
1 changed files with 6 additions and 0 deletions

View File

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