[Mono-bugs] [Bug 70836][Nor] New - Poll Times out on Sockets which have been closed
Tue, 28 Dec 2004 01:08:03 -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 firstname.lastname@example.org.
--- shadow/70836 2004-12-28 01:08:03.000000000 -0500
+++ shadow/70836.tmp.1214 2004-12-28 01:08:03.000000000 -0500
@@ -0,0 +1,50 @@
+Product: Mono: Class Libraries
+OS: Red Hat 9.0
+Summary: Poll Times out on Sockets which have been closed
+Please fill in this template when reporting a bug, unless you know what you
+Description of Problem:
+If you perform a socket.Poll(timeout,SelectMode.SelectRead) on a socket
+which has been closed by the remote server the poll will wait for the full
+duration of the timeout before returning false. When this is attempted with
+the .Net implementation the Poll returns immediately if the remote socket
+is already closed. Note: the socket.Connected property will be unaffected
+by a Poll.
+Steps to reproduce the problem:
+1. Create a socket object and Connect it to a server, sleep for a while
+2. The remote server should close the socket
+3. despite the remote end being closed the Socket.Connected property will
+still return true (this what .Net does)
+4. Perform Socket.Poll() with a non zero timeout
+(5. after the poll returns false the Socket.Connected property will still
+On mono the Poll will wait for the full timeout to elapse before returning
+On .Net the Poll will return false immediately.
+How often does this happen?
+I only tested this with SelectMode.SelectRead - the .Net behaviour should
+be replicated for all SelectModes.