aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs
diff options
context:
space:
mode:
authorMelanie2010-07-08 16:30:36 +0100
committerDiva Canto2010-07-08 16:08:56 -0700
commit94d6d9775f544b55f00b5fa970319645d7ab7801 (patch)
tree0b0ebebeef73314b5da966a364755fb9581d6e06 /OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs
parentThese 2 files want to be committed. (diff)
downloadopensim-SC-94d6d9775f544b55f00b5fa970319645d7ab7801.zip
opensim-SC-94d6d9775f544b55f00b5fa970319645d7ab7801.tar.gz
opensim-SC-94d6d9775f544b55f00b5fa970319645d7ab7801.tar.bz2
opensim-SC-94d6d9775f544b55f00b5fa970319645d7ab7801.tar.xz
Handle a specific exception without spewing red ink.
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs')
-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}