summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
Diffstat (limited to 'unix')
-rw-r--r--unix/tclUnixSock.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c
index 41d729e..6e84ed5 100644
--- a/unix/tclUnixSock.c
+++ b/unix/tclUnixSock.c
@@ -417,7 +417,9 @@ WaitForConnect(
errno = 0;
state = TclUnixWaitForFile(statePtr->fds.fd,
TCL_WRITABLE | TCL_EXCEPTION, timeOut);
- CreateClientSocket(NULL, statePtr);
+ if (state != 0) {
+ CreateClientSocket(NULL, statePtr);
+ }
if (statePtr->flags & TCP_ASYNC_CONNECT) {
/* We are still in progress, so ignore the result of the last
* attempt */