From 1835465698e6ad3b0a71776bec346eb7c5c6a6db Mon Sep 17 00:00:00 2001 From: garyholiday Date: Fri, 31 Mar 2023 15:25:39 -0400 Subject: [PATCH] Fixed edge case where if TLS connection failed it would return as a successful connection to the MQTT broker. --- examples/mqtt/tls_mutual_auth/main/mqtt_demo_mutual_auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/mqtt/tls_mutual_auth/main/mqtt_demo_mutual_auth.c b/examples/mqtt/tls_mutual_auth/main/mqtt_demo_mutual_auth.c index 5dbad3bf9..292cffb73 100644 --- a/examples/mqtt/tls_mutual_auth/main/mqtt_demo_mutual_auth.c +++ b/examples/mqtt/tls_mutual_auth/main/mqtt_demo_mutual_auth.c @@ -750,7 +750,7 @@ static int connectToServerWithBackoffRetries( NetworkContext_t * pNetworkContext } } - if( returnStatus == EXIT_FAILURE ) + if( returnStatus == EXIT_FAILURE || tlsStatus == TLS_TRANSPORT_CONNECT_FAILURE ) { /* Generate a random number and get back-off value (in milliseconds) for the next connection retry. */ backoffAlgStatus = BackoffAlgorithm_GetNextBackoff( &reconnectParams, generateRandomNumber(), &nextRetryBackOff );