diff options
author | Melanie | 2010-07-08 16:30:36 +0100 |
---|---|---|
committer | Melanie | 2010-07-08 16:30:36 +0100 |
commit | baebefeb05f3bfb3ab44a93490649e55c659e66d (patch) | |
tree | 7990387c1c48f30bf39bbf67f9d0bbc8d52bc8f0 /OpenSim | |
parent | Switched order of conditionals. (diff) | |
download | opensim-SC_OLD-baebefeb05f3bfb3ab44a93490649e55c659e66d.zip opensim-SC_OLD-baebefeb05f3bfb3ab44a93490649e55c659e66d.tar.gz opensim-SC_OLD-baebefeb05f3bfb3ab44a93490649e55c659e66d.tar.bz2 opensim-SC_OLD-baebefeb05f3bfb3ab44a93490649e55c659e66d.tar.xz |
Handle a specific exception without spewing red ink.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs | 15 |
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 | } |