aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs15
1 files changed, 13 insertions, 2 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs
index 1cc19c5..b91496b 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs
@@ -73,7 +73,18 @@ namespace OpenSim.Framework.Servers.HttpServer
73 { 73 {
74 if (req.PollServiceArgs.HasEvents(req.RequestID, req.PollServiceArgs.Id)) 74 if (req.PollServiceArgs.HasEvents(req.RequestID, req.PollServiceArgs.Id))
75 { 75 {
76 StreamReader str = new StreamReader(req.Request.Body); 76 StreamReader str;
77 try
78 {
79 str = new StreamReader(req.Request.Body);
80 }
81 catch (System.ArgumentException)
82 {
83 // Stream was not readable means a child agent
84 // was closed due to logout, leaving the
85 // Event Queue request orphaned.
86 continue;
87 }
77 88
78 Hashtable responsedata = req.PollServiceArgs.GetEvents(req.RequestID, req.PollServiceArgs.Id, str.ReadToEnd()); 89 Hashtable responsedata = req.PollServiceArgs.GetEvents(req.RequestID, req.PollServiceArgs.Id, str.ReadToEnd());
79 m_server.DoHTTPGruntWork(responsedata, 90 m_server.DoHTTPGruntWork(responsedata,
@@ -106,4 +117,4 @@ namespace OpenSim.Framework.Servers.HttpServer
106 m_request.Enqueue(pPollServiceHttpRequest); 117 m_request.Enqueue(pPollServiceHttpRequest);
107 } 118 }
108 } 119 }
109} \ No newline at end of file 120}