Skip to content

Commit 38be653

Browse files
committed
always clear nextDupPacketID
1 parent e931c90 commit 38be653

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/MQTTClient.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,7 @@ bool MQTTClient::publish(const char topic[], const char payload[], int length, b
398398
// set duplicate packet id if available
399399
if (this->nextDupPacketID > 0) {
400400
options.dup_id = &this->nextDupPacketID;
401+
this->nextDupPacketID = 0;
401402
}
402403

403404
// publish message

0 commit comments

Comments
 (0)