aboutsummaryrefslogtreecommitdiffstats
path: root/WWW/Library
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2018-03-28 00:52:30 +0000
committerThomas E. Dickey <dickey@invisible-island.net>2018-03-28 00:52:30 +0000
commitcbb0a18855d2ee57d2ad8e9de2502969a27d90fc (patch)
tree91eb13bfc839d07cf45b14ce90359ab9bcc625a3 /WWW/Library
parent43fc651e94bcf7d44a7d7f17d9a1522c88fcd7b4 (diff)
downloadlynx-snapshots-cbb0a18855d2ee57d2ad8e9de2502969a27d90fc.tar.gz
snapshot of project "lynx", label v2-8-9dev_17b
Diffstat (limited to 'WWW/Library')
-rw-r--r--WWW/Library/Implementation/HTTCP.c18
1 files changed, 14 insertions, 4 deletions
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;
}