aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-08-12 23:40:22 +0100
committerJustin Clark-Casey (justincc)2011-08-12 23:40:22 +0100
commit78ff82bfe9728b83a56e315522ee33961abe9a9d (patch)
treeacc9bdeb89ffa345c31356efb044f5dfd756e0ed
parentminor: change login enable/disable messages in last commit so that they occur... (diff)
downloadopensim-SC_OLD-78ff82bfe9728b83a56e315522ee33961abe9a9d.zip
opensim-SC_OLD-78ff82bfe9728b83a56e315522ee33961abe9a9d.tar.gz
opensim-SC_OLD-78ff82bfe9728b83a56e315522ee33961abe9a9d.tar.bz2
opensim-SC_OLD-78ff82bfe9728b83a56e315522ee33961abe9a9d.tar.xz
If a map request to a server fails, always close the outbound connection.
This probably doesn't help with the current memory leak.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index fac2dab..7b00597 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -682,7 +682,6 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
682 mapitemsrequest.ContentLength = buffer.Length; //Count bytes to send 682 mapitemsrequest.ContentLength = buffer.Length; //Count bytes to send
683 os = mapitemsrequest.GetRequestStream(); 683 os = mapitemsrequest.GetRequestStream();
684 os.Write(buffer, 0, buffer.Length); //Send it 684 os.Write(buffer, 0, buffer.Length); //Send it
685 os.Close();
686 //m_log.DebugFormat("[WORLD MAP]: Getting MapItems from {0}", httpserver); 685 //m_log.DebugFormat("[WORLD MAP]: Getting MapItems from {0}", httpserver);
687 } 686 }
688 catch (WebException ex) 687 catch (WebException ex)
@@ -705,6 +704,11 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
705 responseMap["connect"] = OSD.FromBoolean(false); 704 responseMap["connect"] = OSD.FromBoolean(false);
706 return responseMap; 705 return responseMap;
707 } 706 }
707 finally
708 {
709 if (os != null)
710 os.Close();
711 }
708 712
709 string response_mapItems_reply = null; 713 string response_mapItems_reply = null;
710 { // get the response 714 { // get the response