aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorDiva Canto2009-08-25 06:17:36 -0700
committerDiva Canto2009-08-25 06:17:36 -0700
commitcfd9cf7b18331a9d2117294f6ba23dd03a9423a1 (patch)
tree9c22d0ed8b0e0f3b97ab00d847884b71975f0344 /OpenSim
parentMerge branch 'master' of ssh://melanie@opensimulator.org/var/git/opensim (diff)
downloadopensim-SC-cfd9cf7b18331a9d2117294f6ba23dd03a9423a1.zip
opensim-SC-cfd9cf7b18331a9d2117294f6ba23dd03a9423a1.tar.gz
opensim-SC-cfd9cf7b18331a9d2117294f6ba23dd03a9423a1.tar.bz2
opensim-SC-cfd9cf7b18331a9d2117294f6ba23dd03a9423a1.tar.xz
Closed the web request and stream in SynchronousRestSessionObjectPoster -- maybe this is the cause of some timeouts seen in some monos?
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/RestSessionService.cs3
-rw-r--r--OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs5
2 files changed, 8 insertions, 0 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs b/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs
index ec2f9ec..2ef4a36 100644
--- a/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs
+++ b/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs
@@ -75,6 +75,7 @@ namespace OpenSim.Framework.Servers.HttpServer
75 WebRequest request = WebRequest.Create(requestUrl); 75 WebRequest request = WebRequest.Create(requestUrl);
76 request.Method = verb; 76 request.Method = verb;
77 request.ContentType = "text/xml"; 77 request.ContentType = "text/xml";
78 request.Timeout = 20000;
78 79
79 MemoryStream buffer = new MemoryStream(); 80 MemoryStream buffer = new MemoryStream();
80 81
@@ -98,7 +99,9 @@ namespace OpenSim.Framework.Servers.HttpServer
98 { 99 {
99 XmlSerializer deserializer = new XmlSerializer(typeof(TResponse)); 100 XmlSerializer deserializer = new XmlSerializer(typeof(TResponse));
100 deserial = (TResponse)deserializer.Deserialize(resp.GetResponseStream()); 101 deserial = (TResponse)deserializer.Deserialize(resp.GetResponseStream());
102 resp.Close();
101 } 103 }
104 requestStream.Close();
102 return deserial; 105 return deserial;
103 } 106 }
104 } 107 }
diff --git a/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs b/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs
index 423ca75..a2261ba 100644
--- a/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs
@@ -229,6 +229,11 @@ namespace OpenSim.Services.Connectors
229 return SynchronousRestSessionObjectPoster<Guid, InventoryCollection>.BeginPostObject( 229 return SynchronousRestSessionObjectPoster<Guid, InventoryCollection>.BeginPostObject(
230 "POST", m_ServerURI + "/GetFolderContent/", folderID.Guid, sessionID.ToString(), userID.ToString()); 230 "POST", m_ServerURI + "/GetFolderContent/", folderID.Guid, sessionID.ToString(), userID.ToString());
231 } 231 }
232 catch (TimeoutException e)
233 {
234 m_log.ErrorFormat("[INVENTORY CONNECTOR]: GetFolderContent operation to {0} timed out {0} {1}.", m_ServerURI,
235 e.Source, e.Message);
236 }
232 catch (Exception e) 237 catch (Exception e)
233 { 238 {
234 // Maybe we're talking to an old inventory server. Try this other thing. 239 // Maybe we're talking to an old inventory server. Try this other thing.