[Mono-bugs] [Bug 72185][Nor] Changed - Operation on non-blocking socket would block
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Fri, 11 Feb 2005 19:15:08 -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 gonzalo@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=72185
--- shadow/72185 2005-02-11 18:25:09.000000000 -0500
+++ shadow/72185.tmp.7248 2005-02-11 19:15:08.000000000 -0500
@@ -1,13 +1,13 @@
Bug#: 72185
Product: Mono: Runtime
Version: 1.0
OS: unknown
OS Details: XP Pro SP2
-Status: NEW
-Resolution:
+Status: RESOLVED
+Resolution: FIXED
Severity: Unknown
Priority: Normal
Component: io-layer
AssignedTo: gonzalo@ximian.com
ReportedBy: monkey@gmx.info
QAContact: mono-bugs@ximian.com
@@ -296,6 +296,26 @@
Receiving the remaining 0 bytes ...
Sending packet: 131076 bytes ...
-------
Next time. please, provide this information.
+
+------- Additional Comments From gonzalo@ximian.com 2005-02-11 19:15 -------
+There's a bug in packet.cs.
+You have:
+ if (remaining > 0)
+ .... read.....
+and it should be:
+ /* read remaining bytes - if any */
+ while (remaining > 0) {
+ int recv = socket.Receive(buffer, numRead, remaining, SocketFlags.None);
+ numRead += recv;
+ remaining -= recv;
+ if (recv == 0)
+ ....socket closed....do something....
+ }
+
+
+Once that is fixed, it works. Can you test that? If fixing your test
+does not make it work, over the weekend i'll commit other changes i
+have for Socket.cs that make this work for me.