Black Lives Matter - Action and Equality. ... Adafruit joins the Stop Hate for Profit campaign.
0

Python MQTT Client disconnect errors not recoverable
Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Please be positive and constructive with your questions and comments.

Python MQTT Client disconnect errors not recoverable

by mikeadamz on Mon Mar 14, 2016 1:07 am

A few people have posted issues (and even a pull request) on github about this, but if the MQTT client is disconnected (via timeout or what-have-you) while you're running a loop_background, the background thread raises an uncatchable (because it's a separate thread) runtime exception before it gets a chance to run the on_disconnect() callback.

This is a issue posted in november 2015: https://github.com/adafruit/io-client-python/issues/11

Here's mine: https://github.com/adafruit/io-client-python/issues/20

The guy in that first issue actually submitted a pull request that fixes the problem. Is anyone maintaining this stuff?

-Mike

mikeadamz
 
Posts: 17
Joined: Thu Jan 21, 2016 1:20 am

Please be positive and constructive with your questions and comments.