Iâ€™m trying to use the
paho-mqtt python library to communicate with an embedded
The embedded device is
running a custom Linux version with a mosquitto broker (v
1.4.14) and several applications that communicate with this
applications are using the mosquitto C++ library.
On a test machine
(running Windows 8 and Python 2.7.14) Iâ€™ve implemented a
very simple application that connects to the embedded
device, subscribes to a topic and prints out the received
Everything is working
properly, but when it comes to the on_disconnect() callback,
it is never called.
Iâ€™d like to use the
on_disconnect() callback to understand when the embedded
device has finish to shutdown (and thus the mosquitto broker
is not reachable any more), but since the on_disconnect()
callback is never called I cannot tell this apart.
Iâ€™ve tried both with a
keep_alive time of 60 seconds and 5 seconds in the connect()
Do you have any
suggestion why I cannot get the disconnection?
Thank you very much,