From: Fabian Keil <fk@fabiankeil.de>
Date: Sun, 31 Mar 2024 11:54:18 +0000 (+0200)
Subject: wolfSSL: Log if wolfSSL_shutdown() succeeds after retrying
X-Git-Tag: v_4_0_0~60^2~32
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/developer-manual/static/user-manual/quickstart.html?a=commitdiff_plain;h=04ab204c8030fad8cf5846c5b842b62bf9768ee6;p=privoxy.git

wolfSSL: Log if wolfSSL_shutdown() succeeds after retrying
---

diff --git a/wolfssl.c b/wolfssl.c
index 7f6c9646..02048453 100644
--- a/wolfssl.c
+++ b/wolfssl.c
@@ -991,6 +991,11 @@ static void shutdown_connection(WOLFSSL *ssl, const char *type)
          type, fd, shutdown_attempts, ret, error,
          wolfSSL_ERR_error_string((unsigned long)error, buffer));
    }
+   else if (shutdown_attempts > 1)
+   {
+      log_error(LOG_LEVEL_CONNECT, "Succeeded to shutdown %s connection "
+         "on socket %d after %d attempts.", type, fd, shutdown_attempts);
+   }
 }