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