Skip to content

Commit

Permalink
fixed up ping_timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-tritz committed May 12, 2024
1 parent ee32e5e commit 93b7b3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adafruit_minimqtt/adafruit_minimqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,8 +574,8 @@ def ping(self) -> list[int]:
rc = self._wait_for_msg()
if rc:
rcs.append(rc)
if ticks_diff(ticks_ms(), stamp) > ping_timeout * 1000:
raise MMQTTException("PINGRESP not returned from broker.")
if ticks_diff(ticks_ms(), stamp) / 1000 > ping_timeout:
raise MMQTTException(f"PINGRESP not returned from broker within {ping_timeout} seconds.")
return rcs

# pylint: disable=too-many-branches, too-many-statements
Expand Down

0 comments on commit 93b7b3e

Please sign in to comment.