2004-12-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Tue, 28 Dec 2004 12:08:47 +0000 (12:08 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Tue, 28 Dec 2004 12:08:47 +0000 (12:08 -0000)
* Socket.cs: for Receive*/Send*, don't set the connected status to false
when the error is EINPROGRESS or EWOULDBLOCK.

svn path=/trunk/mcs/; revision=38128

mcs/class/System/System.Net.Sockets/ChangeLog
mcs/class/System/System.Net.Sockets/Socket.cs

index 1b23d2800adc23b5702c7ccd96e81c89119fe7da..1f36c6dc2b4c531ff199cafd194f935e6e52302b 100644 (file)
@@ -1,3 +1,8 @@
+2004-12-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * Socket.cs: for Receive*/Send*, don't set the connected status to false
+       when the error is EINPROGRESS or EWOULDBLOCK.
+
 2004-12-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * NetworkStream.cs: Write should ensure that writes all the contents
index 78151c928d63e98ff0c6b535d5e9d83555471a3c..9cbc2c2815f5670763073791870f4ac0f09fc053 100644 (file)
@@ -1321,7 +1321,9 @@ namespace System.Net.Sockets
                        ret = Receive_internal (socket, buf, offset, size, flags, out error);
 
                        if (error != 0) {
-                               connected = false;
+                               if (error != 10035 && error != 10036) // WSAEWOULDBLOCK && WSAEINPROGRESS
+                                       connected = false;
+
                                throw new SocketException (error);
                        }
                        
@@ -1405,7 +1407,9 @@ namespace System.Net.Sockets
                        cnt = RecvFrom_internal (socket, buf, offset, size, flags, ref sockaddr, out error);
 
                        if (error != 0) {
-                               connected = false;
+                               if (error != 10035 && error != 10036) // WSAEWOULDBLOCK && WSAEINPROGRESS
+                                       connected = false;
+
                                throw new SocketException (error);
                        }
 
@@ -1483,7 +1487,9 @@ namespace System.Net.Sockets
                        ret = Send_internal (socket, buf, offset, size, flags, out error);
 
                        if (error != 0) {
-                               connected = false;
+                               if (error != 10035 && error != 10036) // WSAEWOULDBLOCK && WSAEINPROGRESS
+                                       connected = false;
+
                                throw new SocketException (error);
                        }
 
@@ -1566,7 +1572,9 @@ namespace System.Net.Sockets
                        ret = SendTo_internal (socket, buffer, offset, size, flags, sockaddr, out error);
 
                        if (error != 0) {
-                               connected = false;
+                               if (error != 10035 && error != 10036) // WSAEWOULDBLOCK && WSAEINPROGRESS
+                                       connected = false;
+
                                throw new SocketException (error);
                        }