mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
If a map request to a server fails, always close the outbound connection.
This probably doesn't help with the current memory leak.
This commit is contained in:
@@ -682,7 +682,6 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
mapitemsrequest.ContentLength = buffer.Length; //Count bytes to send
|
||||
os = mapitemsrequest.GetRequestStream();
|
||||
os.Write(buffer, 0, buffer.Length); //Send it
|
||||
os.Close();
|
||||
//m_log.DebugFormat("[WORLD MAP]: Getting MapItems from {0}", httpserver);
|
||||
}
|
||||
catch (WebException ex)
|
||||
@@ -705,6 +704,11 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
responseMap["connect"] = OSD.FromBoolean(false);
|
||||
return responseMap;
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (os != null)
|
||||
os.Close();
|
||||
}
|
||||
|
||||
string response_mapItems_reply = null;
|
||||
{ // get the response
|
||||
|
||||
Reference in New Issue
Block a user