提交 eae19f67 编写于 作者: R Roger A. Light

Add missing code for #550.

上级 7075efba
......@@ -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()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册