Fix blocker bug 121326 (any SSL transaction causes Mac to freeze) by checking in temporary patch from bug 106188; this reverts Mac to using blocking connects. r=wtc. NSPRPUB_PRE_4_2_CLIENT_BRANCH
authorsfraser%netscape.com
Mon, 28 Jan 2002 23:14:33 +0000
branchNSPRPUB_PRE_4_2_CLIENT_BRANCH
changeset 2206 aef8a4c376e1acef98e39e0681a7a489b9a2b04d
parent 2201 f03aca088cb0b6f3cd8260722fb10c6c2554b4c6
child 2210 e1799636d73188f755bb3fe839c0ebd956e1117d
push idunknown
push userunknown
push dateunknown
reviewerswtc
bugs121326, 106188
Fix blocker bug 121326 (any SSL transaction causes Mac to freeze) by checking in temporary patch from bug 106188; this reverts Mac to using blocking connects. r=wtc.
pr/src/io/prsocket.c
--- a/pr/src/io/prsocket.c
+++ b/pr/src/io/prsocket.c
@@ -342,21 +342,31 @@ static PRStatus PR_CALLBACK SocketConnec
     if (err != 0) {
         _PR_MD_MAP_CONNECT_ERROR(err);
         return PR_FAILURE;
     }
     return PR_SUCCESS;
 
 #elif defined(XP_MAC)
 
+#if 0
     err = _MD_mac_get_nonblocking_connect_error(osfd);
     if (err == -1)
         return PR_FAILURE;
 	else     
 		return PR_SUCCESS;
+#else
+    if (out_flags & PR_POLL_EXCEPT) {
+        PR_SetError(PR_CONNECT_REFUSED_ERROR, 0);
+        return PR_FAILURE;
+    }
+
+    PR_ASSERT(out_flags & PR_POLL_WRITE);
+    return PR_SUCCESS;
+#endif
 
 #elif defined(XP_BEOS)
 
     err = _MD_beos_get_nonblocking_connect_error(fd);
     if( err != 0 ) {
 	_PR_MD_MAP_CONNECT_ERROR(err);
 	return PR_FAILURE;
     }