mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 09:16:28 +08:00
Closed the web request and stream in SynchronousRestSessionObjectPoster -- maybe this is the cause of some timeouts seen in some monos?
This commit is contained in:
@@ -75,6 +75,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
WebRequest request = WebRequest.Create(requestUrl);
|
||||
request.Method = verb;
|
||||
request.ContentType = "text/xml";
|
||||
request.Timeout = 20000;
|
||||
|
||||
MemoryStream buffer = new MemoryStream();
|
||||
|
||||
@@ -98,7 +99,9 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
{
|
||||
XmlSerializer deserializer = new XmlSerializer(typeof(TResponse));
|
||||
deserial = (TResponse)deserializer.Deserialize(resp.GetResponseStream());
|
||||
resp.Close();
|
||||
}
|
||||
requestStream.Close();
|
||||
return deserial;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -229,6 +229,11 @@ namespace OpenSim.Services.Connectors
|
||||
return SynchronousRestSessionObjectPoster<Guid, InventoryCollection>.BeginPostObject(
|
||||
"POST", m_ServerURI + "/GetFolderContent/", folderID.Guid, sessionID.ToString(), userID.ToString());
|
||||
}
|
||||
catch (TimeoutException e)
|
||||
{
|
||||
m_log.ErrorFormat("[INVENTORY CONNECTOR]: GetFolderContent operation to {0} timed out {0} {1}.", m_ServerURI,
|
||||
e.Source, e.Message);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// Maybe we're talking to an old inventory server. Try this other thing.
|
||||
|
||||
Reference in New Issue
Block a user