Skip to content

Commit b5fc155

Browse files
committed
Destroy TLS instance even if disconnect send fails
Fixes #96
1 parent f8c8472 commit b5fc155

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/aws_iot_mqtt_client_connect.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -520,10 +520,7 @@ IoT_Error_t _aws_iot_mqtt_internal_disconnect(AWS_IoT_Client *pClient) {
520520

521521
/* send the disconnect packet */
522522
if(serialized_len > 0) {
523-
rc = aws_iot_mqtt_internal_send_packet(pClient, serialized_len, &timer);
524-
if(SUCCESS != rc) {
525-
FUNC_EXIT_RC(rc);
526-
}
523+
aws_iot_mqtt_internal_send_packet(pClient, serialized_len, &timer);
527524
}
528525

529526
/* Clean network stack */

0 commit comments

Comments
 (0)