about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--CHANGES4
-rw-r--r--WWW/Library/Implementation/HTTCP.c18
2 files changed, 17 insertions, 5 deletions
diff --git a/CHANGES b/CHANGES
index 3ed051f4..47de75aa 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,9 +1,11 @@
--- $LynxId: CHANGES,v 1.965 2018/03/27 23:28:34 tom Exp $
+-- $LynxId: CHANGES,v 1.966 2018/03/28 00:52:30 tom Exp $
 ===============================================================================
 Changes since Lynx 2.8 release
 ===============================================================================
 
 2018-03-27 (2.8.9dev.18)
+* modify HTDoConnect(), adding a check for keyboard interrupt with 'z' in the
+  select-loop -TD
 * modify legacy feature from Lynx 2.7.2 which checks the hostname of a URI
   to guess whether to use HTTP, FTP, etc., depending upon the prefix of the
   URIs hostname.  This is now an optional feature, GUESS_SCHEME, which defaults
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;
     }