diff options
author | Alan Mackenzie <acm@muc.de> | 2017-02-12 10:59:03 +0000 |
---|---|---|
committer | Alan Mackenzie <acm@muc.de> | 2017-02-12 10:59:03 +0000 |
commit | f4d5b687150810129b7a1d5b006e31ccf82b691b (patch) | |
tree | 4229b13800349032697daae3904dc3773e6b7a80 /src/gnutls.c | |
parent | d5514332d4a6092673ce1f78fadcae0c57f7be64 (diff) | |
parent | 148100d98319499f0ac6f57b8be08cbd14884a5c (diff) | |
download | emacs-comment-cache.tar.gz |
Merge branch 'master' into comment-cachecomment-cache
Diffstat (limited to 'src/gnutls.c')
-rw-r--r-- | src/gnutls.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gnutls.c b/src/gnutls.c index 735d2e35810..d0d7f2dfc84 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -390,7 +390,7 @@ gnutls_try_handshake (struct Lisp_Process *proc) { ret = gnutls_handshake (state); emacs_gnutls_handle_error (state, ret); - QUIT; + maybe_quit (); } while (ret < 0 && gnutls_error_is_fatal (ret) == 0 @@ -582,8 +582,17 @@ emacs_gnutls_handle_error (gnutls_session_t session, int err) if (gnutls_error_is_fatal (err)) { + int level = 1; + /* Mostly ignore "The TLS connection was non-properly + terminated" message which just means that the peer closed the + connection. */ +#ifdef HAVE_GNUTLS3 + if (err == GNUTLS_E_PREMATURE_TERMINATION) + level = 3; +#endif + + GNUTLS_LOG2 (level, max_log_level, "fatal error:", str); ret = 0; - GNUTLS_LOG2 (1, max_log_level, "fatal error:", str); } else { |