Mercurial > hg > ucis.core
comparison 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 |
comparison
equal
deleted
inserted
replaced
98:c9bc014bdbe8 | 99:be17dd3f6927 |
---|---|
719 State = HTTPConnectionState.Closed; | 719 State = HTTPConnectionState.Closed; |
720 return Reader; | 720 return Reader; |
721 } | 721 } |
722 | 722 |
723 private void SendErrorAndClose(int code) { | 723 private void SendErrorAndClose(int code) { |
724 SendErrorResponse(code); | 724 try { |
725 Close(); | 725 SendErrorResponse(code); |
726 } catch (IOException) { | |
727 } catch (SocketException) { | |
728 } catch (ObjectDisposedException) { | |
729 } finally { | |
730 Close(); | |
731 } | |
726 } | 732 } |
727 private void Close() { | 733 private void Close() { |
728 if (State == HTTPConnectionState.Closed) return; | 734 if (State == HTTPConnectionState.Closed) return; |
729 Reader.Close(); | 735 Reader.Close(); |
730 State = HTTPConnectionState.Closed; | 736 State = HTTPConnectionState.Closed; |