Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[paho-dev] disconnect on python library

Hi all,

 

I’m trying to use the paho-mqtt python library to communicate with an embedded device.

The embedded device is running a custom Linux version with a mosquitto broker (v 1.4.14) and several applications that communicate with this local broker.

The embedded 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 messages.

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() method.

 

Do you have any suggestion why I cannot get the disconnection?

 

Thank you very much,

Niccolo`


Back to the top