diff --git a/src/gnutls.c b/src/gnutls.c index aa245ee5c39..4d5a909db0d 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -625,6 +625,8 @@ gnutls_try_handshake (struct Lisp_Process *proc) while ((ret = gnutls_handshake (state)) < 0) { + if (gnutls_error_is_fatal (ret)) + return emacs_gnutls_handle_error (state, ret); do ret = gnutls_handshake (state); while (ret == GNUTLS_E_INTERRUPTED);