diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-11-03 09:47:25 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-11-03 09:47:25 +0000 |
commit | 858efc353dfabf470e52b051cbccb8d46badd2d8 (patch) | |
tree | f5c07eb9ddabceb7780972b31759dc66f76b114f | |
parent | 75f2a555c21185c1f7acae2c88f376857341f00f (diff) | |
download | rspamd-858efc353dfabf470e52b051cbccb8d46badd2d8.tar.gz rspamd-858efc353dfabf470e52b051cbccb8d46badd2d8.zip |
[Minor] Ssl: Improve logging
-rw-r--r-- | src/libutil/ssl_util.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/libutil/ssl_util.c b/src/libutil/ssl_util.c index e7bd33be9..f4fe3b31c 100644 --- a/src/libutil/ssl_util.c +++ b/src/libutil/ssl_util.c @@ -456,7 +456,11 @@ rspamd_ssl_shutdown (struct rspamd_ssl_connection *conn) } else { /* Cannot do anything else, fatal error */ - msg_debug_ssl ("ssl shutdown: fatal error"); + GError *err = NULL; + + rspamd_tls_set_error (ret, "final shutdown", &err); + msg_debug_ssl ("ssl shutdown: fatal error: %e", err); + g_error_free (err); rspamd_ssl_connection_dtor (conn); return; @@ -652,8 +656,13 @@ rspamd_ssl_connect_fd (struct rspamd_ssl_connection *conn, gint fd, msg_debug_ssl ("not connected, want write"); } else { + GError *err = NULL; + conn->shut = ssl_shut_unclean; - msg_debug_ssl ("not connected, fatal error %d", ret); + rspamd_tls_set_error (ret, "initial connect", &err); + msg_debug_ssl ("not connected, fatal error %e", err); + g_error_free (err); + return FALSE; } |