adafruit / Adafruit_IO_Python

Adafruit IO Python Client Library
Other
225 stars 99 forks source link

call on_disconnect handler for all disconnects #12

Closed mgk closed 8 years ago

mgk commented 8 years ago

Proposed fix for adafruit/io-client-python#11 : always call the registered on_disconnect() handler.

I am testings this on an RPi and will update to confirm that reconnecting works with this change. It may take a day or so for the disconnect to occur.

jerbly commented 8 years ago

I was just looking in to doing this same fix. Can this get merged?

mgk commented 8 years ago

Thanks. Just to followup I did see reconnecting work.

tdicola commented 8 years ago

This should be fixed with the push here: https://github.com/adafruit/io-client-python/commit/508bf8a93486a40bb00cca9aa1f1889ca2c3c815 Now the disconnect handler should always be called, even if something unexpected happens.