Don’t get publish() to work in paho.mqtt.client.on_connect thread
Summary A developer reported that paho.mqtt.client.publish() calls inside the on_connect callback (and a subsequent infinite loop within that callback) were not reaching the broker, while a publish call in the main thread succeeded. The root cause was blocking the Paho client’s network loop. The on_connect callback executes within the thread handling network I/O (started by … Read more