aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/RestClient.cs
diff options
context:
space:
mode:
authorMelanie Thielker2008-08-31 10:42:35 +0000
committerMelanie Thielker2008-08-31 10:42:35 +0000
commit805deb5a9ba51307393dc5e11b100c86ee7c1b79 (patch)
tree3ea5d5aa6f720a8112e3c55d912291d18e13b084 /OpenSim/Framework/Communications/RestClient.cs
parent* Pragma out deprecation warning and comment out to remove other warnings in ... (diff)
downloadopensim-SC_OLD-805deb5a9ba51307393dc5e11b100c86ee7c1b79.zip
opensim-SC_OLD-805deb5a9ba51307393dc5e11b100c86ee7c1b79.tar.gz
opensim-SC_OLD-805deb5a9ba51307393dc5e11b100c86ee7c1b79.tar.bz2
opensim-SC_OLD-805deb5a9ba51307393dc5e11b100c86ee7c1b79.tar.xz
Attempt to fix an issue I havebeen seeing, where asset server failure
results in a memory leak which will make the region crash and burn after a while.
Diffstat (limited to 'OpenSim/Framework/Communications/RestClient.cs')
-rw-r--r--OpenSim/Framework/Communications/RestClient.cs13
1 files changed, 12 insertions, 1 deletions
diff --git a/OpenSim/Framework/Communications/RestClient.cs b/OpenSim/Framework/Communications/RestClient.cs
index b71a590..7d45186 100644
--- a/OpenSim/Framework/Communications/RestClient.cs
+++ b/OpenSim/Framework/Communications/RestClient.cs
@@ -286,7 +286,18 @@ namespace OpenSim.Framework.Communications
286 _asyncException = null; 286 _asyncException = null;
287 287
288// IAsyncResult responseAsyncResult = _request.BeginGetResponse(new AsyncCallback(ResponseIsReadyDelegate), _request); 288// IAsyncResult responseAsyncResult = _request.BeginGetResponse(new AsyncCallback(ResponseIsReadyDelegate), _request);
289 _response = (HttpWebResponse) _request.GetResponse(); 289 try
290 {
291 _response = (HttpWebResponse) _request.GetResponse();
292 }
293 catch (System.Net.WebException e)
294 {
295 m_log.ErrorFormat("[ASSET] Error fetching asset from asset server");
296 m_log.Debug(e.ToString());
297
298 return null;
299 }
300
290 Stream src = _response.GetResponseStream(); 301 Stream src = _response.GetResponseStream();
291 int length = src.Read(_readbuf, 0, BufferSize); 302 int length = src.Read(_readbuf, 0, BufferSize);
292 while (length > 0) 303 while (length > 0)