aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-11-03 11:37:48 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-11-03 11:37:48 +0000
commite8bc508e8f5c294993e8f83303385f83ec9ebd21 (patch)
tree35baffbc7648838184e9545f69ce5d8b0c479c75
parentdb028d8757203f78bb3b6d54d7a707ad9f115030 (diff)
downloadrspamd-e8bc508e8f5c294993e8f83303385f83ec9ebd21.tar.gz
rspamd-e8bc508e8f5c294993e8f83303385f83ec9ebd21.zip
[Minor] Try to improve logging
-rw-r--r--src/libutil/ssl_util.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libutil/ssl_util.c b/src/libutil/ssl_util.c
index 3e8f25910..7901644bb 100644
--- a/src/libutil/ssl_util.c
+++ b/src/libutil/ssl_util.c
@@ -433,7 +433,7 @@ rspamd_ssl_connection_dtor (struct rspamd_ssl_connection *conn)
static void
rspamd_ssl_shutdown (struct rspamd_ssl_connection *conn)
{
- gint ret = 0, retries;
+ gint ret = 0, nret, retries;
static const gint max_retries = 5;
/*
@@ -464,14 +464,14 @@ rspamd_ssl_shutdown (struct rspamd_ssl_connection *conn)
else if (ret < 0) {
short what;
- ret = SSL_get_error (conn->ssl, ret);
+ nret = SSL_get_error (conn->ssl, ret);
conn->state = ssl_next_shutdown;
- if (ret == SSL_ERROR_WANT_READ) {
+ if (nret == SSL_ERROR_WANT_READ) {
msg_debug_ssl ("ssl shutdown: need read");
what = EV_READ;
}
- else if (ret == SSL_ERROR_WANT_WRITE) {
+ else if (nret == SSL_ERROR_WANT_WRITE) {
msg_debug_ssl ("ssl shutdown: need write");
what = EV_WRITE;
}
@@ -480,7 +480,8 @@ rspamd_ssl_shutdown (struct rspamd_ssl_connection *conn)
GError *err = NULL;
rspamd_tls_set_error (ret, "final shutdown", &err);
- msg_debug_ssl ("ssl shutdown: fatal error: %e", err);
+ msg_debug_ssl ("ssl shutdown: fatal error: %e; retries=%d; ret=%d",
+ err, retries, ret);
g_error_free (err);
rspamd_ssl_connection_dtor (conn);