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

[443881] Handle exceptions from select() in client loop() function.

Handle exceptions from select() in client loop() function. Closes #443881.
Thanks to Jeff Jasper.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=443881
Change-Id: I4bbee80554917b61a0d413dc490370391a6fe2b5
上级 5b69c110
......@@ -11,6 +11,8 @@ v1.0.2
- Fix possible race condition when connecting with TLS and publishing at the
same time, which could lead to PUBLISH data being sent before any other
messages and unencrypted. Closes #443964. Thanks to Hiram van Paassen.
- Handle exceptions from select() in client loop() function. Closes #443881.
Thanks to Jeff Jasper.
v1.0.1
......
......@@ -802,6 +802,12 @@ class Client(object):
except TypeError:
# Socket isn't correct type, in likelihood connection is lost
return MQTT_ERR_CONN_LOST
except ValueError:
# Can occur if we just reconnected but rlist/wlist contain a -1 for
# some reason.
return MQTT_ERR_CONN_LOST
except:
return MQTT_ERR_UNKNOWN
if self.socket() in socklist[0]:
rc = self.loop_read(max_packets)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册