From f5c677fe42d2cbf4a85101503b36d97353e7612d Mon Sep 17 00:00:00 2001 From: Wiebe Cazemier Date: Sat, 22 May 2021 13:07:00 +0200 Subject: [PATCH] Fix bug where first_byte and bites[0] aren't consistent --- mqttpacket.cpp | 1 + 1 file changed, 1 insertion(+), 0 deletions(-) diff --git a/mqttpacket.cpp b/mqttpacket.cpp index 95beb6f..16c806d 100644 --- a/mqttpacket.cpp +++ b/mqttpacket.cpp @@ -481,6 +481,7 @@ void MqttPacket::handlePublish() // Set dup flag to 0, because that must not be propagated [MQTT-3.3.1-3]. // Existing subscribers don't get retain=1. [MQTT-3.3.1-9] bites[0] &= 0b11110110; + first_byte = bites[0]; // For the existing clients, we can just write the same packet back out, with our small alterations. sender->getThreadData()->getSubscriptionStore()->queuePacketAtSubscribers(*subtopics, *this); -- libgit2 0.21.4