Index: /trunk/src/VBox/Runtime/r3/socket.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/socket.cpp	(revision 27509)
+++ /trunk/src/VBox/Runtime/r3/socket.cpp	(revision 27510)
@@ -156,9 +156,4 @@
 #endif
 } RTSOCKADDRUNION;
-
-
-/*******************************************************************************
-*   Internal Functions                                                         *
-*******************************************************************************/
 
 
@@ -909,4 +904,37 @@
 
 /**
+ * Undos the harm done by WSAEventSelect.
+ *
+ * @returns IPRT status code.
+ * @param   pThis               The socket handle.
+ */
+static int rtSocketPollClearEventAndMakeBlocking(RTSOCKETINT *pThis)
+{
+    int rc = VINF_SUCCESS;
+    if (pThis->fSubscribedEvts)
+    {
+        if (WSAEventSelect(pThis->hNative, WSA_INVALID_EVENT, 0) == 0)
+        {
+            pThis->fSubscribedEvts = 0;
+
+            u_long fNonBlocking = 0;
+            int rc2 = ioctlsocket(pThis->hNative, FIONBIO, &fNonBlocking);
+            if (rc2 != 0)
+            {
+                rc = rtSocketError();
+                AssertMsgFailed(("%Rrc; rc2=%d\n", rc, rc2));
+            }
+        }
+        else
+        {
+            rc = rtSocketError();
+            AssertMsgFailed(("%Rrc\n", rc));
+        }
+    }
+    return rc;
+}
+
+
+/**
  * Updates the mask of events we're subscribing to.
  *
@@ -927,9 +955,4 @@
     {
         pThis->fSubscribedEvts = fEvents;
-
-        u_long fNonBlocking = 0;
-        if (ioctlsocket(pThis->hNative, FIONBIO, &fNonBlocking))
-            AssertMsgFailed(("%Rrc\n", rtSocketError()));
-
         return VINF_SUCCESS;
     }
@@ -1052,5 +1075,8 @@
     {
         if (pThis->cUsers == 1)
+        {
+            rtSocketPollClearEventAndMakeBlocking(pThis);
             pThis->hPollSet = NIL_RTPOLLSET;
+        }
         ASMAtomicDecU32(&pThis->cUsers);
     }
@@ -1087,7 +1113,10 @@
     pThis->fPollEvts = 0;
 
-    /* unlock the socket. */
+    /* Make the socket blocking again and unlock the handle. */
     if (pThis->cUsers == 1)
+    {
+        rtSocketPollClearEventAndMakeBlocking(pThis);
         pThis->hPollSet = NIL_RTPOLLSET;
+    }
     ASMAtomicDecU32(&pThis->cUsers);
     return fRetEvents;
Index: /trunk/src/VBox/Runtime/r3/win/poll-win.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/win/poll-win.cpp	(revision 27509)
+++ /trunk/src/VBox/Runtime/r3/win/poll-win.cpp	(revision 27510)
@@ -197,5 +197,5 @@
     if (    dwRc >= WAIT_OBJECT_0
         &&  dwRc <  WAIT_OBJECT_0 + cHandles)
-        rc = VINF_SUCCESS;
+        rc = VERR_INTERRUPTED;
     else if (dwRc == WAIT_TIMEOUT)
         rc = VERR_TIMEOUT;
