Mercurial > hg > ucis.core
diff Net/HTTP.cs @ 99:be17dd3f6927
Small fixes in HTTP server and libusb1 backend
author | Ivo Smits <Ivo@UCIS.nl> |
---|---|
date | Sun, 17 Aug 2014 15:35:23 +0200 |
parents | ebdff34b9e4f |
children | 04c56f31db37 |
line wrap: on
line diff
--- a/Net/HTTP.cs Tue Jul 08 16:52:10 2014 +0200 +++ b/Net/HTTP.cs Sun Aug 17 15:35:23 2014 +0200 @@ -721,8 +721,14 @@ } private void SendErrorAndClose(int code) { - SendErrorResponse(code); - Close(); + try { + SendErrorResponse(code); + } catch (IOException) { + } catch (SocketException) { + } catch (ObjectDisposedException) { + } finally { + Close(); + } } private void Close() { if (State == HTTPConnectionState.Closed) return;