diff --git a/src/paho/mqtt/client.py b/src/paho/mqtt/client.py index c9577278a320b247ed4309bffdbb5025aa530eff..8bd14fd52346161541b52a9dfc98e839605c71c6 100644 --- a/src/paho/mqtt/client.py +++ b/src/paho/mqtt/client.py @@ -345,6 +345,11 @@ class MQTTMessageInfo(object): """Block until the message associated with this object is published.""" if self.rc == MQTT_ERR_QUEUE_SIZE: raise ValueError('Message is not queued due to ERR_QUEUE_SIZE') + elif self.rc == MQTT_ERR_AGAIN: + pass + elif self.rc > 0: + raise RuntimeError('Message not published: %s' % (error_string(self.rc))) + with self._condition: while not self._published: self._condition.wait()