Skip to content

Commit

Permalink
Merge pull request #237 from vladak/remove_recv_into_workaround
Browse files Browse the repository at this point in the history
no need to check zero byte returned from recv_into()
  • Loading branch information
dhalbert authored Jan 19, 2025
2 parents d4b87d2 + b8fa023 commit 57ed4f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adafruit_minimqtt/adafruit_minimqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ def _wait_for_msg( # noqa: PLR0912, Too many branches
return None
raise MMQTTException from error

if res in [None, b"", b"\x00"]:
if res in [None, b""]:
# If we get here, it means that there is nothing to be received
return None
pkt_type = res[0] & MQTT_PKT_TYPE_MASK
Expand Down

0 comments on commit 57ed4f0

Please sign in to comment.