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.0.6.0-stable
parent
cd5f8cf9ec
commit
805deb5a9b
|
@ -63,6 +63,9 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
|
||||
Stream s = rc.Request();
|
||||
|
||||
if (s == null)
|
||||
return null;
|
||||
|
||||
if (s.Length > 0)
|
||||
{
|
||||
XmlSerializer xs = new XmlSerializer(typeof (AssetBase));
|
||||
|
|
|
@ -286,7 +286,18 @@ namespace OpenSim.Framework.Communications
|
|||
_asyncException = null;
|
||||
|
||||
// IAsyncResult responseAsyncResult = _request.BeginGetResponse(new AsyncCallback(ResponseIsReadyDelegate), _request);
|
||||
try
|
||||
{
|
||||
_response = (HttpWebResponse) _request.GetResponse();
|
||||
}
|
||||
catch (System.Net.WebException e)
|
||||
{
|
||||
m_log.ErrorFormat("[ASSET] Error fetching asset from asset server");
|
||||
m_log.Debug(e.ToString());
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
Stream src = _response.GetResponseStream();
|
||||
int length = src.Read(_readbuf, 0, BufferSize);
|
||||
while (length > 0)
|
||||
|
|
Loading…
Reference in New Issue