Handle a specific exception without spewing red ink.

0.7-release
Melanie 2010-07-08 16:30:36 +01:00 committed by Diva Canto
parent 9316e0b867
commit 94d6d9775f
1 changed files with 13 additions and 2 deletions

View File

@ -73,7 +73,18 @@ namespace OpenSim.Framework.Servers.HttpServer
{
if (req.PollServiceArgs.HasEvents(req.RequestID, req.PollServiceArgs.Id))
{
StreamReader str = new StreamReader(req.Request.Body);
StreamReader str;
try
{
str = new StreamReader(req.Request.Body);
}
catch (System.ArgumentException)
{
// Stream was not readable means a child agent
// was closed due to logout, leaving the
// Event Queue request orphaned.
continue;
}
Hashtable responsedata = req.PollServiceArgs.GetEvents(req.RequestID, req.PollServiceArgs.Id, str.ReadToEnd());
m_server.DoHTTPGruntWork(responsedata,
@ -106,4 +117,4 @@ namespace OpenSim.Framework.Servers.HttpServer
m_request.Enqueue(pPollServiceHttpRequest);
}
}
}
}