Skip to content

Commit 833b8c3

Browse files
committed
Reset RX state to read type on empty payload + callback
1 parent e35a187 commit 833b8c3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/MqttClient.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,10 @@ void MqttClient::poll()
575575
if (_rxLength == 0) {
576576
// no payload to read, ack zero length message
577577
ackRxMessage();
578+
579+
if (_onMessage) {
580+
_rxState = MQTT_CLIENT_RX_STATE_READ_TYPE;
581+
}
578582
}
579583
}
580584

0 commit comments

Comments
 (0)