Socket disconnect does not end with on_disconnect call.
I tried to test with this example: https://github.com/eclipse/paho.mqtt.python/blob/master/examples/loop_asyncio.py
Using iptables on the server with mosquitto to block requests from my Pi(192.168.1.3) to the brocker.
sudo iptables -D OUTPUT -p tcp -d 192.168.1.3 -j DROP
sudo iptables -D INPUT -p tcp -s 192.168.1.3 -j DROP
The example prints:
Socket closed
So on_socket_close is called. But why on_disconnect is not called?
Then nothing happens.
def on_disconnect(client, userdata, rc):
Apologies for the lack of response here. I'd appreciate it if you could attempt to replicate this with the current release (there have been quite a few fixes since 2019) and confirm if it's still an issue?
Closing due to age/inactivity. Please fee free to reopen if this is still an issue.