Index: /trunk/src/VBox/Runtime/r3/socket.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/socket.cpp	(revision 31188)
+++ /trunk/src/VBox/Runtime/r3/socket.cpp	(revision 31189)
@@ -1361,10 +1361,17 @@
             pThis->fSubscribedEvts = 0;
 
-            u_long fNonBlocking = 0;
-            int rc2 = ioctlsocket(pThis->hNative, FIONBIO, &fNonBlocking);
-            if (rc2 != 0)
+            /*
+             * Don't switch back to blocking mode if the socket is currently
+             * operated in non-blocking mode.
+             */
+            if (pThis->fBlocking)
             {
-                rc = rtSocketError();
-                AssertMsgFailed(("%Rrc; rc2=%d\n", rc, rc2));
+                u_long fNonBlocking = 0;
+                int rc2 = ioctlsocket(pThis->hNative, FIONBIO, &fNonBlocking);
+                if (rc2 != 0)
+                {
+                    rc = rtSocketError();
+                    AssertMsgFailed(("%Rrc; rc2=%d\n", rc, rc2));
+                }
             }
         }
