[Mono-bugs] [Bug 358987] New: HttpListener leaking socket file descriptors

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Feb 5 14:53:41 EST 2008


https://bugzilla.novell.com/show_bug.cgi?id=358987


           Summary: HttpListener leaking socket file descriptors
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: petee at mindtouch.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=193286)
 --> (https://bugzilla.novell.com/attachment.cgi?id=193286)
HttpConnection patch

If a client sends a request to HttpListener then closes the socket before
HttpListener sends a response, Socket.Shutdown throws an exception, 
socket.Close() is never called, and the file descriptor isn't closed.  

Here's the exception:
Unhandled Exception: System.Net.Sockets.SocketException: The socket is not
connected
  at System.Net.Sockets.Socket.Shutdown (SocketShutdown how) [0x00000]
  at System.Net.HttpConnection.Close () [0x00000]
  at System.Net.HttpListenerResponse.Close (Boolean force) [0x00000]
  at System.Net.HttpListenerResponse.Close () [0x00000]
  at System.Net.ResponseStream.Close () [0x00000]
  at System.Net.HttpConnection.Close () [0x00000]
  at System.Net.HttpListenerResponse.Close (Boolean force) [0x00000]
  at System.Net.HttpListenerResponse.Close () [0x00000]
  at Microsoft.Samples.HttpListener.HttpRequestListener.ProcessRequests
(System.String[] prefixes) [0x00000]
  at Microsoft.Samples.HttpListener.HttpRequestListener.Main () [0x00000]

I've attached a patch that seems to fix the issue.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list