diff options
| author | davygrvy@pobox.com <davygrvy> | 2004-05-05 18:22:38 (GMT) |
|---|---|---|
| committer | davygrvy@pobox.com <davygrvy> | 2004-05-05 18:22:38 (GMT) |
| commit | d23924d77bed8711cb601864e70c7b0eeb60ec0d (patch) | |
| tree | 5b74d4a91749577ace1f57b814d44d3abc4cbca3 | |
| parent | 5e84e565f6c15506ea966910096d74f808f443ea (diff) | |
| download | tcl-d23924d77bed8711cb601864e70c7b0eeb60ec0d.zip tcl-d23924d77bed8711cb601864e70c7b0eeb60ec0d.tar.gz tcl-d23924d77bed8711cb601864e70c7b0eeb60ec0d.tar.bz2 | |
(SocketEventProc) : connect errors should fire both the readable and
writable handlers because this is how it works on UNIX [Bug 794839]
| -rw-r--r-- | win/tclWinSock.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/win/tclWinSock.c b/win/tclWinSock.c index b52b4f3..1477eeb 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinSock.c,v 1.42 2004/02/21 02:17:31 davygrvy Exp $ + * RCS: @(#) $Id: tclWinSock.c,v 1.43 2004/05/05 18:22:38 davygrvy Exp $ */ #include "tclWinInt.h" @@ -901,6 +901,10 @@ SocketEventProc(evPtr, flags) } if (events & (FD_WRITE | FD_CONNECT)) { mask |= TCL_WRITABLE; + if (events & FD_CONNECT && infoPtr->lastError != NO_ERROR) { + /* connect errors should also fire the readable handler. */ + mask |= TCL_READABLE; + } } if (mask) { @@ -2461,7 +2465,7 @@ SocketProc(hwnd, message, wParam, lParam) } } - if(infoPtr->flags & SOCKET_ASYNC_CONNECT) { + if (infoPtr->flags & SOCKET_ASYNC_CONNECT) { infoPtr->flags &= ~(SOCKET_ASYNC_CONNECT); if (error != ERROR_SUCCESS) { TclWinConvertWSAError((DWORD) error); |
