Skip to content

Commit

Permalink
Added Comment Explaining Behavior
Browse files Browse the repository at this point in the history
Added a comment referencing the MQTT specification for why the server may not immediately respond to an UNSUBACK
  • Loading branch information
ch4nsuk3 committed Nov 8, 2024
1 parent 920e64f commit 0356eec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions adafruit_minimqtt/adafruit_minimqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,8 @@ def unsubscribe( # noqa: PLR0912, Too many branches
self._subscribed_topics.remove(t)
return
if op != MQTT_PUBLISH:
# [3.10.4] The Server may continue to deliver existing messages buffered for delivery
# to the client prior to sending the UNSUBACK Packet.
raise MMQTTException(
f"invalid message received as response to UNSUBSCRIBE: {hex(op)}"
)
Expand Down

0 comments on commit 0356eec

Please sign in to comment.