[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| [mosquitto-dev] Running Python client from within a Qt framework | 
I am running into stability issues while integrating the Mosquitto python client into a plugin framework of a larger Qt Application (QGIS).
What does seem to work is a basic
connect() // With a long timeout wrapped by a QTimer to reconnect by calling connect again
Followed by:
loop()  // from within another QTimer event   (note loop_forever or loop_async causes the plugin's parent app to die)
However, calling disconnect or attempting to re/connect after a disconnection timeout puts the client into a funny state that it seldom recovers from.
Recovering from a server event/stop/start seems to be ok.  And I can stop the client by stopping the connection and loop timers while maintaining the connection.  But these steps seem to be an unnecessary work around; am concerned about stability issues; and am wondering what best practice is here. Thank you.