[Mono-bugs] [Bug 38136][Nor] Changed - System.Net.Sockets.Socket exception when connecting
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Sun, 4 May 2003 19:19:30 -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 gonzalo@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=38136
--- shadow/38136 Sun May 4 18:49:29 2003
+++ shadow/38136.tmp.23362 Sun May 4 19:19:30 2003
@@ -1,21 +1,22 @@
Bug#: 38136
-Product: Mono/Class Libraries
+Product: Mono/Runtime
Version: unspecified
OS: unknown
OS Details:
Status: REOPENED
Resolution:
Severity: Unknown
Priority: Normal
-Component: System
+Component: misc
AssignedTo: gonzalo@ximian.com
ReportedBy: alp@atoker.com
QAContact: mono-bugs@ximian.com
TargetMilestone: ---
URL:
+Cc: dick@ximian.com,gonzalo@ximian.com
Summary: System.Net.Sockets.Socket exception when connecting
Jabber-Net 0.06, a C# instant messaging client library, triggers this
issue: On running a simple test case which uses Jabber-Net to connect to a
Jabber server, the mono runtime triggers this exception:
@@ -178,6 +179,34 @@
Connect - catch - poll - connect works!
I also fixed Receive cause after fixing Connect this one failed too.
------- Additional Comments From gonzalo@ximian.com 2003-02-16 17:12 -------
Fixed in CVS.
+
+------- Additional Comments From gonzalo@ximian.com 2003-05-04 19:19 -------
+May be this is a compiler or runtime bug... I'm assigning it
+to the runtime by now...
+
+If I change the try { } catch () { .... try { } catch () {} to be:
+[...]
+ bool exc = false;
+ try {
+ socket.Connect (endpoint);
+ } catch (SocketException e) {
+ //WSAEINPROGRESS
+ if (e.NativeErrorCode != 10036)
+ throw;
+ exc = true;
+ }
+
+ if (exc) {
+ socket.Poll (-1, SelectMode.SelectWrite);
+ try {
+ socket.Connect (endpoint);
+ } catch (SocketException e2) {
+ rethrow = e2;
+ }
+ }
+[...]
+
+it works.