summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2012-05-03 18:28:11 (GMT)
committerdgp <dgp@users.sourceforge.net>2012-05-03 18:28:11 (GMT)
commitcc2c00050cfccbc978735bf0b02c142fa8f33afb (patch)
tree81f592975b9dc8fda20e9ef9f92f9388262941a6 /unix
parent58073016b87e2cbe4d4efaddbeacd450faee4238 (diff)
downloadtcl-cc2c00050cfccbc978735bf0b02c142fa8f33afb.zip
tcl-cc2c00050cfccbc978735bf0b02c142fa8f33afb.tar.gz
tcl-cc2c00050cfccbc978735bf0b02c142fa8f33afb.tar.bz2
3428753 Fix [socket -async] connections that manage to connect synchronously.
Diffstat (limited to 'unix')
-rw-r--r--unix/tclUnixSock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c
index 8c94e7f..04cfe66 100644
--- a/unix/tclUnixSock.c
+++ b/unix/tclUnixSock.c
@@ -1030,7 +1030,8 @@ CreateClientSocket(
state->status = status;
}
if (status == 0) {
- goto out;
+ CLEAR_BITS(state->flags, TCP_ASYNC_CONNECT);
+ goto out;
}
}
}
@@ -1041,7 +1042,6 @@ out:
/*
* An asynchonous connection has finally succeeded or failed.
*/
- CLEAR_BITS(state->flags, TCP_ASYNC_CONNECT);
TcpWatchProc(state, state->filehandlers);
TclUnixSetBlockingMode(state->fds.fd, state->cachedBlocking);