File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -337,7 +337,17 @@ def _set_as_published(self):
337
337
self ._condition .notify ()
338
338
339
339
def wait_for_publish (self , timeout = None ):
340
- """Block until the message associated with this object is published."""
340
+ """Block until the message associated with this object is published, or
341
+ until the timeout occurs. If timeout is None, this will never time out.
342
+ Set timeout to a positive number of seconds, e.g. 1.2, to enable the
343
+ timeout.
344
+
345
+ Raises ValueError if the message was not queued due to the outgoing
346
+ queue being full.
347
+
348
+ Raises RuntimeError if the message was not published for another
349
+ reason.
350
+ """
341
351
if self .rc == MQTT_ERR_QUEUE_SIZE :
342
352
raise ValueError ('Message is not queued due to ERR_QUEUE_SIZE' )
343
353
elif self .rc == MQTT_ERR_AGAIN :
You can’t perform that action at this time.
0 commit comments