Skip to content

Commit b76d6bb

Browse files
committed
use MQTT_PUBLISH instead of literal
1 parent 29e60e9 commit b76d6bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_minimqtt/adafruit_minimqtt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ def publish(self, topic, msg, retain=False, qos=0):
632632
), "Quality of Service Level 2 is unsupported by this library."
633633

634634
# fixed header. [3.3.1.2], [3.3.1.3]
635-
pub_hdr_fixed = bytearray([0x30 | retain | qos << 1])
635+
pub_hdr_fixed = bytearray([MQTT_PUBLISH | retain | qos << 1])
636636

637637
# variable header = 2-byte Topic length (big endian)
638638
pub_hdr_var = bytearray(struct.pack(">H", len(topic.encode("utf-8"))))

0 commit comments

Comments
 (0)