Commit 42e23674 authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen
Browse files

Tweak TLS error messaging on closed connections

* src/gnutls.c (emacs_gnutls_handle_error): Demote the normal
peer-closed-connection "The TLS connection was non-properly
terminated" message to a lower level so that it isn't shown to
the user by default.
parent 456696a8
......@@ -582,8 +582,15 @@ 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. */
if (err == GNUTLS_E_PREMATURE_TERMINATION)
level = 3;
GNUTLS_LOG2 (level, max_log_level, "fatal error:", str);
ret = 0;
GNUTLS_LOG2 (1, max_log_level, "fatal error:", str);
}
else
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment