[Mono-bugs] [Bug 73592][Maj] Changed - socket doesn't close in thread

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 19 Mar 2005 12:49:32 -0500 (EST)

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 robertj@gmx.net.


--- shadow/73592	2005-03-11 10:11:55.000000000 -0500
+++ shadow/73592.tmp.10773	2005-03-19 12:49:32.000000000 -0500
@@ -10,13 +10,12 @@
 Component: System
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: borodin@zg.bezopasnost.ru               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
 Summary: socket doesn't close in thread
 If a thread which created a socket and is waiting in EndAccept() is
 aborted, it doesn't close the socket by Close()
 mono (and glibc) compiled without NTPL
@@ -70,6 +69,19 @@
 ------- Additional Comments From dick@ximian.com  2005-03-11 10:11 -------
 Does the socket close if you run this on the ms runtime?
+------- Additional Comments From robertj@gmx.net  2005-03-19 12:49 -------
+The socket gets closed on MSFT's runtime.
+I had a look at System/System.Net.Sockets/Socket.cs and
+the culprit seems to be Close's implementation: it simply
+calls Dispose which in turn doesn't close the socket
+unless "pendingEnds" is zero. But "pendingEnds" is never
+zero if, well, a BeginXYZ call is pending.
+I'd recommend to implement Close() w/out the pending check
+(like in Dispose(false))