paho.mqtt.python icon indicating copy to clipboard operation
paho.mqtt.python copied to clipboard

Socket disconnect does not end with on_disconnect call.

Open yozik04 opened this issue 6 years ago • 2 comments

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.

yozik04 avatar Oct 22 '19 20:10 yozik04

def on_disconnect(client, userdata, rc):

ShaoMingya avatar Oct 12 '20 05:10 ShaoMingya

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?

MattBrittan avatar Jan 07 '24 23:01 MattBrittan

Closing due to age/inactivity. Please fee free to reopen if this is still an issue.

MattBrittan avatar Jul 18 '24 00:07 MattBrittan