From eae19f67241377652fb494fdbcfd60a7cc12faac Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Thu, 22 Jul 2021 11:10:22 +0100 Subject: [PATCH] Add missing code for #550. --- src/paho/mqtt/client.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/paho/mqtt/client.py b/src/paho/mqtt/client.py index c957727..8bd14fd 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() -- GitLab