wolfSSL: Unconditionally increment shutdown_attempts
authorFabian Keil <fk@fabiankeil.de>
Mon, 1 Apr 2024 14:41:27 +0000 (16:41 +0200)
committerFabian Keil <fk@fabiankeil.de>
Mon, 1 Apr 2024 15:22:14 +0000 (17:22 +0200)
Previously the succeeding attempt wasn't counted.

wolfssl.c

index f011491..10ecd6b 100644 (file)
--- a/wolfssl.c
+++ b/wolfssl.c
@@ -973,9 +973,9 @@ static void shutdown_connection(WOLFSSL *ssl, const char *type)
          return;
       }
       ret = wolfSSL_shutdown(ssl);
+      shutdown_attempts++;
       if (WOLFSSL_SUCCESS != ret)
       {
-         shutdown_attempts++;
          log_error(LOG_LEVEL_CONNECT, "Failed to shutdown %s connection "
             "on socket %d. Attempts so far: %d, ret: %d", type, fd,
             shutdown_attempts, ret);