Skip to content

Commit

Permalink
Destroy TLS instance even if disconnect send fails
Browse files Browse the repository at this point in the history
Fixes #96
  • Loading branch information
vareddy committed Oct 11, 2017
1 parent f8c8472 commit b5fc155
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/aws_iot_mqtt_client_connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -520,10 +520,7 @@ IoT_Error_t _aws_iot_mqtt_internal_disconnect(AWS_IoT_Client *pClient) {

/* send the disconnect packet */
if(serialized_len > 0) {
rc = aws_iot_mqtt_internal_send_packet(pClient, serialized_len, &timer);
if(SUCCESS != rc) {
FUNC_EXIT_RC(rc);
}
aws_iot_mqtt_internal_send_packet(pClient, serialized_len, &timer);
}

/* Clean network stack */
Expand Down

0 comments on commit b5fc155

Please sign in to comment.