diff options
author | oehhar <harald.oehlmann@elmicron.de> | 2014-03-10 15:38:21 (GMT) |
---|---|---|
committer | oehhar <harald.oehlmann@elmicron.de> | 2014-03-10 15:38:21 (GMT) |
commit | 10a9e13e5d711c11a2108e811fa9dbc84e786d13 (patch) | |
tree | b7982e3a75eebad926f7b10c97bd7082b2fdeed2 /win/tclWinSock.c | |
parent | 3bb727a3c79f3c3b459b5933c0029de205c71ce0 (diff) | |
download | tcl-10a9e13e5d711c11a2108e811fa9dbc84e786d13.zip tcl-10a9e13e5d711c11a2108e811fa9dbc84e786d13.tar.gz tcl-10a9e13e5d711c11a2108e811fa9dbc84e786d13.tar.bz2 |
Fire write fileevent if async connect fails finally (test socket-14.2)
Diffstat (limited to 'win/tclWinSock.c')
-rw-r--r-- | win/tclWinSock.c | 14 |
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. * *---------------------------------------------------------------------- */ |