From cbb0a18855d2ee57d2ad8e9de2502969a27d90fc Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Wed, 28 Mar 2018 00:52:30 +0000 Subject: snapshot of project "lynx", label v2-8-9dev_17b --- WWW/Library/Implementation/HTTCP.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'WWW') diff --git a/WWW/Library/Implementation/HTTCP.c b/WWW/Library/Implementation/HTTCP.c index abe06777..aad7e59c 100644 --- a/WWW/Library/Implementation/HTTCP.c +++ b/WWW/Library/Implementation/HTTCP.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTTCP.c,v 1.140 2018/03/21 00:29:50 tom Exp $ + * $LynxId: HTTCP.c,v 1.141 2018/03/28 00:44:27 tom Exp $ * * Generic Communication Code HTTCP.c * ========================== @@ -1965,7 +1965,9 @@ int HTDoConnect(const char *url, int tries = 0; #ifdef SOCKET_DEBUG_TRACE - HTInetStatus("this socket's first connect"); + if (SOCKET_ERRNO != EINPROGRESS) { + HTInetStatus("this socket's first connect"); + } #endif /* SOCKET_DEBUG_TRACE */ ret = 0; while (ret <= 0) { @@ -2002,7 +2004,9 @@ int HTDoConnect(const char *url, #ifdef SOCKET_DEBUG_TRACE if (tries == 1) { - HTInetStatus("this socket's first select"); + if (SOCKET_ERRNO != EINPROGRESS) { + HTInetStatus("this socket's first select"); + } } #endif /* SOCKET_DEBUG_TRACE */ /* @@ -2031,6 +2035,11 @@ int HTDoConnect(const char *url, if ((ret < 0) && (SOCKET_ERRNO != EALREADY)) { status = ret; break; + } else if (((SOCKET_ERRNO == EALREADY) || + (SOCKET_ERRNO == EINPROGRESS)) && + HTCheckForInterrupt()) { + status = HT_INTERRUPTED; + break; } else if (ret > 0) { /* * Extra check here for connection success, if we try to @@ -2132,7 +2141,8 @@ int HTDoConnect(const char *url, if (status < 0) { NETCLOSE(*s); *s = -1; - continue; + if (status != HT_INTERRUPTED) + continue; } break; } -- cgit 1.4.1-2-gfad0