Skip to content

Commit d562a5f

Browse files
sarenameasaggarw13
andauthored
Update demos/mqtt/mqtt_demo_basic_tls/mqtt_demo_basic_tls.c
Initialize packetIdTo resend to the invalid one. Co-authored-by: Archit Aggarwal <[email protected]>
1 parent c9effdb commit d562a5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

demos/mqtt/mqtt_demo_basic_tls/mqtt_demo_basic_tls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ static int handlePublishResend( MQTTContext_t * pMqttContext )
499499
MQTTStatus_t mqttStatus = MQTTSuccess;
500500
uint8_t index = 0U;
501501
MQTTStateCursor_t cursor = MQTT_STATE_CURSOR_INITIALIZER;
502-
uint16_t packetIdToResend = 0;
502+
uint16_t packetIdToResend = MQTT_PACKET_ID_INVALID;
503503

504504
assert( pMqttContext != NULL );
505505
assert( outgoingPublishPackets != NULL );

0 commit comments

Comments
 (0)