Index: tls.c
==================================================================
--- tls.c
+++ tls.c
@@ -657,18 +657,17 @@
 
 	dprintf("Calling Tls_WaitForConnect");
 	ret = Tls_WaitForConnect(statePtr, &err, 1);
 	dprintf("Tls_WaitForConnect returned: %i", ret);
 
-	if (ret < 0) {
-		if ((statePtr->flags & TLS_TCL_ASYNC) && err == EAGAIN) {
-			dprintf("Async set and err = EAGAIN");
-			ret = 0;
-		}
-	}
-
-	if (ret < 0) {
+	if (
+	    ret < 0 && \
+	    ((statePtr->flags & TLS_TCL_ASYNC) && err == EAGAIN)
+	) {
+		dprintf("Async set and err = EAGAIN");
+		ret = 0;
+	} else if (ret < 0) {
 		errStr = statePtr->err;
 		Tcl_ResetResult(interp);
 		Tcl_SetErrno(err);
 
 		if (!errStr || *errStr == 0) {