Open thashimalayaratnam opened 5 years ago
It's one of the characteristics of MQTT that there is no acknowledgement to the disconnect request, so the timing of reconnection may be tricky.
Having said that, this might be due to issue #402, which I'll be looking at soon.
In https://github.com/eclipse/paho.mqtt.java/blob/master/org.eclipse.paho.client.mqttv3/src/main/java/org/eclipse/paho/client/mqttv3/internal/CommsReceiver.java#L177-L182 we throw exception if not in
isDisconnecting()
state. I am seeing transientEOF Exceptions
thrown from aforementioned line when I re-connect a clean session using the sameMqttClient
object. I.e.I suspect this is is because the broker is sending EOF but since we are trying to connect back that exception is thrown? Is this possible? Thanks in advance.
I notice if I use a different
MqttClient
to re-connect then this won't happen.