2008-06-11 Stephane Delcroix <sdelcroix@novell.com>
authorStephane Delcroix <stephane@mono-cvs.ximian.com>
Wed, 11 Jun 2008 14:07:18 +0000 (14:07 -0000)
committerStephane Delcroix <stephane@mono-cvs.ximian.com>
Wed, 11 Jun 2008 14:07:18 +0000 (14:07 -0000)
* SocketAsyncEventArgs.cs: catch SocketException in ConnectAsync
and set the SocketError accordingly.

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

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

index 537c54d7907c2f384e0a0983aacb55ad4248952b..dce8caecf694d5f261af69ec8e0847fd72dcdce0 100644 (file)
@@ -1,3 +1,8 @@
+2008-06-11  Stephane Delcroix  <sdelcroix@novell.com>
+
+       * SocketAsyncEventArgs.cs: catch SocketException in ConnectAsync
+       and set the SocketError accordingly.
+
 2008-05-09  Marek Habersack  <mhabersack@novell.com>
 
        * SocketAsyncEventArgs.cs: implemented support for executing
index be0ba9ff14836f9dcdfb409ddfff47c9c83a5b5e..58db90a05e66ee3eac531cf5905f1e31ec851ccc 100644 (file)
@@ -193,6 +193,8 @@ namespace System.Net.Sockets
                                        curSocket.Connect (RemoteEndPoint);
                                        curSocket.Connected = true;
                                }
+                       } catch (SocketException se){
+                               error = se.SocketErrorCode;
                        } finally {
                                SocketError = error;
                                OnCompleted (this);