Bug 331169: Remove obsolete Sleep(0) during socket connection on Windows, r=wtc
authorBrian Smith <bsmith@mozilla.com>
Mon, 06 May 2013 14:15:08 -0700
changeset 4464 fb7fff159c8c4804e2603b579edb92541be8b3b5
parent 4463 ff10dbda9cc88a8d66f6b2d1174bd496039e1135
child 4465 8a9fc0355b0992aa4cbe93e5fbf75d63a72d3d98
push id15
push userbsmith@mozilla.com
push dateMon, 06 May 2013 21:16:25 +0000
reviewerswtc
bugs331169
Bug 331169: Remove obsolete Sleep(0) during socket connection on Windows, r=wtc
pr/src/io/prsocket.c
--- a/pr/src/io/prsocket.c
+++ b/pr/src/io/prsocket.c
@@ -283,24 +283,16 @@ static PRStatus PR_CALLBACK SocketConnec
     if (err != 0) {
         _PR_MD_MAP_CONNECT_ERROR(err);
         return PR_FAILURE;
     }
     return PR_SUCCESS;
 
 #elif defined(WIN32) || defined(WIN16)
 
-#if defined(WIN32)
-    /*
-     * The sleep circumvents a bug in Win32 WinSock.
-     * See Microsoft Knowledge Base article ID: Q165989.
-     */
-    Sleep(0);
-#endif /* WIN32 */
-
     if (out_flags & PR_POLL_EXCEPT) {
         int len = sizeof(err);
         if (getsockopt(osfd, (int)SOL_SOCKET, SO_ERROR, (char *) &err, &len)
                 == SOCKET_ERROR) {
             _PR_MD_MAP_GETSOCKOPT_ERROR(WSAGetLastError());
             return PR_FAILURE;
         }
         if (err != 0) {