Closed the web request and stream in SynchronousRestSessionObjectPoster -- maybe this is the cause of some timeouts seen in some monos?
parent
1e4238af92
commit
cfd9cf7b18
|
@ -75,6 +75,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
WebRequest request = WebRequest.Create(requestUrl);
|
WebRequest request = WebRequest.Create(requestUrl);
|
||||||
request.Method = verb;
|
request.Method = verb;
|
||||||
request.ContentType = "text/xml";
|
request.ContentType = "text/xml";
|
||||||
|
request.Timeout = 20000;
|
||||||
|
|
||||||
MemoryStream buffer = new MemoryStream();
|
MemoryStream buffer = new MemoryStream();
|
||||||
|
|
||||||
|
@ -98,7 +99,9 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
{
|
{
|
||||||
XmlSerializer deserializer = new XmlSerializer(typeof(TResponse));
|
XmlSerializer deserializer = new XmlSerializer(typeof(TResponse));
|
||||||
deserial = (TResponse)deserializer.Deserialize(resp.GetResponseStream());
|
deserial = (TResponse)deserializer.Deserialize(resp.GetResponseStream());
|
||||||
|
resp.Close();
|
||||||
}
|
}
|
||||||
|
requestStream.Close();
|
||||||
return deserial;
|
return deserial;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -229,6 +229,11 @@ namespace OpenSim.Services.Connectors
|
||||||
return SynchronousRestSessionObjectPoster<Guid, InventoryCollection>.BeginPostObject(
|
return SynchronousRestSessionObjectPoster<Guid, InventoryCollection>.BeginPostObject(
|
||||||
"POST", m_ServerURI + "/GetFolderContent/", folderID.Guid, sessionID.ToString(), userID.ToString());
|
"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)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
// Maybe we're talking to an old inventory server. Try this other thing.
|
// Maybe we're talking to an old inventory server. Try this other thing.
|
||||||
|
|
Loading…
Reference in New Issue