summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoroehhar <harald.oehlmann@elmicron.de>2014-03-10 15:38:21 (GMT)
committeroehhar <harald.oehlmann@elmicron.de>2014-03-10 15:38:21 (GMT)
commitad589d66e2f1ec13f0ba2c482bd70547aaec8fba (patch)
treeb7982e3a75eebad926f7b10c97bd7082b2fdeed2
parentc6c9538be56e14eb89700fa1ca1903d246a756c0 (diff)
downloadtcl-ad589d66e2f1ec13f0ba2c482bd70547aaec8fba.zip
tcl-ad589d66e2f1ec13f0ba2c482bd70547aaec8fba.tar.gz
tcl-ad589d66e2f1ec13f0ba2c482bd70547aaec8fba.tar.bz2
Fire write fileevent if async connect fails finally (test socket-14.2)
-rw-r--r--win/tclWinSock.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index e689830..01a0f6f 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.c
@@ -1395,6 +1395,12 @@ out:
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"couldn't open socket: %s", Tcl_PosixError(interp)));
}
+ /*
+ * In the final error case inform fileevent that we failed
+ */
+ if (async_callback) {
+ Tcl_NotifyChannel(infoPtr->channel, TCL_WRITABLE);
+ }
return TCL_ERROR;
}
/*
@@ -1423,8 +1429,11 @@ out:
*
* WaitForConnect --
*
- * Terminate an asyncroneous connect syncroneously.
- * This routine should only be called if flag ASYNC_CONNECT is set.
+ * Process an asyncroneous connect by gets/puts commands.
+ * For blocking calls, terminate connect synchroneously.
+ * For non blocking calls, do one asynchroneous step if possible.
+ * This routine should only be called if flag SOCKET_REENTER_PENDING
+ * is set.
*
* Results:
* Returns 1 on success or 0 on failure, with an error code in
@@ -1432,6 +1441,7 @@ out:
*
* Side effects:
* Processes socket events off the system queue.
+ * May process asynchroneous connect.
*
*----------------------------------------------------------------------
*/