File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -593,7 +593,7 @@ def ping(self) -> list[int]:
593593 self ._connected ()
594594 self .logger .debug ("Sending PINGREQ" )
595595 self ._sock .send (MQTT_PINGREQ )
596- ping_timeout = self .keep_alive
596+ ping_timeout = self ._recv_timeout
597597 stamp = self .get_monotonic_time ()
598598 self ._last_msg_sent_timestamp = stamp
599599 rc , rcs = None , []
@@ -602,7 +602,9 @@ def ping(self) -> list[int]:
602602 if rc :
603603 rcs .append (rc )
604604 if self .get_monotonic_time () - stamp > ping_timeout :
605- raise MMQTTException ("PINGRESP not returned from broker." )
605+ raise MMQTTException (
606+ f"PINGRESP not returned from broker within { ping_timeout } seconds."
607+ )
606608 return rcs
607609
608610 # pylint: disable=too-many-branches, too-many-statements
You can’t perform that action at this time.
0 commit comments