bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-wget] gnutls_handshake can return GNUTLS_E_INTERRUPTED


From: Daniel Stenberg
Subject: [Bug-wget] gnutls_handshake can return GNUTLS_E_INTERRUPTED
Date: Thu, 30 Jun 2016 15:18:18 +0200 (CEST)
User-agent: Alpine 2.20 (DEB 67 2015-01-07)

Hello,

gnutls_handshake() is documented to possibly return GNUTLS_E_INTERRUPTED as well as GNUTLS_E_AGAIN and should probably behave similarly for both return codes within wget.

diff --git a/src/gnutls.c b/src/gnutls.c
index 63c7c33..44c497b 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -463,11 +463,11 @@ _do_handshake (gnutls_session_t session, int fd, double timeout)
   /* We don't stop the handshake process for non-fatal errors */
   do
     {
       err = gnutls_handshake (session);

-      if (timeout && err == GNUTLS_E_AGAIN)
+      if (timeout && ((err == GNUTLS_E_AGAIN) || (err == 
GNUTLS_E_INTERRUPTED)))
         {
           if (gnutls_record_get_direction (session))
             {
               /* wait for writeability */
               err = select_fd (fd, timeout, WAIT_FOR_WRITE);


--

 / daniel.haxx.se



reply via email to

[Prev in Thread] Current Thread [Next in Thread]