diff options
author | Justin Clarke Casey | 2008-04-19 22:48:06 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-04-19 22:48:06 +0000 |
commit | 70233d937f445f61295d90d004feb66d0a507dbc (patch) | |
tree | 512a137583bb5629fa36a00f762364a6d29ac932 /OpenSim/Framework/Servers/BaseHttpServer.cs | |
parent | * Insert an OpenSim warning telling the user to ignore the ERROR assembly sca... (diff) | |
download | opensim-SC-70233d937f445f61295d90d004feb66d0a507dbc.zip opensim-SC-70233d937f445f61295d90d004feb66d0a507dbc.tar.gz opensim-SC-70233d937f445f61295d90d004feb66d0a507dbc.tar.bz2 opensim-SC-70233d937f445f61295d90d004feb66d0a507dbc.tar.xz |
* Start catching rogue SocketExceptions which occur (at least on mono) when a response stream for a request which actually required no response, is closed
Diffstat (limited to 'OpenSim/Framework/Servers/BaseHttpServer.cs')
-rw-r--r-- | OpenSim/Framework/Servers/BaseHttpServer.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index de15923..00c81c8 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs | |||
@@ -199,6 +199,16 @@ namespace OpenSim.Framework.Servers | |||
199 | } | 199 | } |
200 | } | 200 | } |
201 | } | 201 | } |
202 | catch (System.Net.Sockets.SocketException e) | ||
203 | { | ||
204 | // At least on linux, it appears that if the client makes a request without requiring the response, | ||
205 | // an unconnected socket exception is thrown when we close the response output stream. There's no | ||
206 | // obvious way to tell if the client didn't require the response, so instead we'll catch and ignore | ||
207 | // the exception instead. | ||
208 | // | ||
209 | // An alternative may be to turn off all response write exceptions on the HttpListener, but let's go | ||
210 | // with the minimum first | ||
211 | } | ||
202 | catch (Exception e) | 212 | catch (Exception e) |
203 | { | 213 | { |
204 | m_log.ErrorFormat("[BASE HTTP SERVER]: HandleRequest() threw {0}", e); | 214 | m_log.ErrorFormat("[BASE HTTP SERVER]: HandleRequest() threw {0}", e); |