How to force cancel/interrupt a reconnecting state client?
bigcat26 opened this issue ยท 3 comments
bigcat26 commented
Checklist
- I've searched the project's
issues
. - I've searched the project's
discussions
.
โ Question
How to force cancel/interrupt a reconnecting state client?
๐ Additional context
When I try to disconnect a Mqtt3RxClient that is in the DISCONNECTED_RECONNECT state, it returns a throwable with the message โcom.hivemq.client.mqtt.exceptions.MqttClientStateException: MQTT client is not connected.โ However, it may still successfully reconnect after a while, which is not what I want. I need to force an interruption of the reconnecting process immediately, such as by closing the underlying socket, but I did not find any API to access the underlying socket. Do you have any suggestions?