[Mono-bugs] [Bug 74842][Maj] New - Stopping a listener doesn't break out of an AcceptSocket() call

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 5 May 2005 16:37:22 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by joeshaw@novell.com.

http://bugzilla.ximian.com/show_bug.cgi?id=74842

--- shadow/74842	2005-05-05 16:37:22.000000000 -0400
+++ shadow/74842.tmp.31276	2005-05-05 16:37:22.000000000 -0400
@@ -0,0 +1,29 @@
+Bug#: 74842
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: joeshaw@novell.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Stopping a listener doesn't break out of an AcceptSocket() call
+
+With both TcpListener and UnixListener, if you start a listener with
+Start() and then block on an AcceptTcpClient() or AcceptSocket() (or
+AcceptUnixClient()), if you later call Stop() on the Listener, the accept
+calls should throw a SocketException.  This is what happens on Windows and
+is implied in the MSDN docs.
+
+I'm attaching a test case.  It starts a listener on port 8888.  Don't
+connect to it.  After 10 seconds the listener is stopped, but on mono the
+program never exits because it's still blocking on the accept call.
+
+This might be related to bug #74840.