summaryrefslogtreecommitdiffstats
path: root/win/tclWinSock.c
diff options
context:
space:
mode:
authordavygrvy <davygrvy@pobox.com>2004-05-05 18:22:38 (GMT)
committerdavygrvy <davygrvy@pobox.com>2004-05-05 18:22:38 (GMT)
commit9b1c85d742a4783ed8c180683646212f6610e018 (patch)
tree5b74d4a91749577ace1f57b814d44d3abc4cbca3 /win/tclWinSock.c
parentc468181748dd568a55755362995a806c35544b9a (diff)
downloadtcl-9b1c85d742a4783ed8c180683646212f6610e018.zip
tcl-9b1c85d742a4783ed8c180683646212f6610e018.tar.gz
tcl-9b1c85d742a4783ed8c180683646212f6610e018.tar.bz2
(SocketEventProc) : connect errors should fire both the readable and
writable handlers because this is how it works on UNIX [Bug 794839]
Diffstat (limited to 'win/tclWinSock.c')
-rw-r--r--win/tclWinSock.c8
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);