Handle a specific exception without spewing red ink.

prebuild-update
Melanie 2010-07-08 16:30:36 +01:00
parent 32cfdb0f6a
commit baebefeb05
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,