summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/tclWinSock.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index 00df85f..5ac8f47 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.c
@@ -1317,8 +1317,9 @@ CreateSocket(
if (connect(sock, addrPtr->ai_addr, addrPtr->ai_addrlen)
== SOCKET_ERROR) {
- TclWinConvertError((DWORD) WSAGetLastError());
- if (Tcl_GetErrno() != EWOULDBLOCK) {
+ DWORD error = (DWORD) WSAGetLastError();
+ if (error != WSAEWOULDBLOCK) {
+ TclWinConvertError(error);
goto looperror;
}