1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-23 18:47:57 +00:00

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.
This commit is contained in:
Lars Ingebrigtsen 2017-01-25 00:23:28 +01:00
parent 456696a838
commit 42e2367413

View File

@ -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
{