There is a delay of 15 to 18 mins in getting the disconnect event notification from paho library in case of network disconnection behind a network proxy.
There is a delay of 15 to 18 mins in getting the disconnect event notification from paho library in case of network disconnection behind a network proxy. Once the network goes off, the connectionLost method is invoked after a delay of 17 minutes. Please need help on this
The Paho Python client doesn't have a connectionLost method. I presume you're using the Paho Java client - I'll transfer the issue there.
I have the same issue, there is a delay of 15 to 20 minutes depending of the network architecture. In fact I'm not able to reproduce this issue when I want to. I noticed that the connected() method works well. So I've done a work around with this and do not use the connectionLost callback anymore. This issue could be the same as this one. This issue appears depending on the environment where the code runs.
When the client is in the state where the connected() == false, the connectionLost() has not already been called and I call connect(), an exception is thrown: Exception during connect: org.eclipse.paho.client.mqttv3.MqttException: Client is currently disconnecting This might help
I think this issue is located somewhere in the ClientComms class.
I still can't comment on this, but wanted to check that it isn't that the client has a high keepalive value? keepalive of 500 seconds would mean the client considers the broker to have gone by 1000 seconds, which is near enough 17 minutes.
The keepalive value is 60 seconds in my case