Skip to content

Commit 0356eec

Browse files
committed
Added Comment Explaining Behavior
Added a comment referencing the MQTT specification for why the server may not immediately respond to an UNSUBACK
1 parent 920e64f commit 0356eec

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

adafruit_minimqtt/adafruit_minimqtt.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -865,6 +865,8 @@ def unsubscribe( # noqa: PLR0912, Too many branches
865865
self._subscribed_topics.remove(t)
866866
return
867867
if op != MQTT_PUBLISH:
868+
# [3.10.4] The Server may continue to deliver existing messages buffered for delivery
869+
# to the client prior to sending the UNSUBACK Packet.
868870
raise MMQTTException(
869871
f"invalid message received as response to UNSUBSCRIBE: {hex(op)}"
870872
)

0 commit comments

Comments
 (0)