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
- 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
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)