I created a python script that has 2 threads with MQTT connections 1 for publishing the sensor reading (if changed) and 1 for subscribing for taking an action
but i notice that after i leave it running with no publish or receive the script stop publishing and receiving and i have to restart it to make it work again
is there a solution for this issue ?
i thought about publishing a dummy message every X of second to refresh the connection.
is this a good idea ?