Fix the erroneous check (#1210)

This is to address this issue: https://github.com/FreeRTOS/FreeRTOS/issues/1206
pull/1212/head
xuelix 10 months ago committed by GitHub
parent 469b8ad175
commit 2023ac6404
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -801,7 +801,7 @@ BaseType_t xEstablishMqttSession( MQTTContext_t * pxMqttContext,
} }
} }
if( xReturnStatus == pdFAIL ) if( xReturnStatus != pdFAIL )
{ {
/* Keep a flag for indicating if MQTT session is established. This /* Keep a flag for indicating if MQTT session is established. This
* flag will mark that an MQTT DISCONNECT has to be sent at the end * flag will mark that an MQTT DISCONNECT has to be sent at the end

@ -794,7 +794,7 @@ BaseType_t xEstablishMqttSession( MQTTContext_t * pxMqttContext,
} }
} }
if( xReturnStatus == pdFAIL ) if( xReturnStatus != pdFAIL )
{ {
/* Keep a flag for indicating if MQTT session is established. This /* Keep a flag for indicating if MQTT session is established. This
* flag will mark that an MQTT DISCONNECT has to be sent at the end * flag will mark that an MQTT DISCONNECT has to be sent at the end

Loading…
Cancel
Save