Closed Jade-Jade-Jade closed 3 years ago
@Jade-Jade-Jade did you have a look at https://github.com/xmppjs/xmpp.js/tree/master/packages/reconnect ?
You can access the reconnect
object via client.reconnect
. Beside reconnect.delay
, you can use reconnect.stop()
and reconnect.start
.
If you need more control I would suggest disabling the plugin with reconnect.stop
and implementing the logic yourself.
@sonnyp Thank you for the response, I am able to access the reconnect object!
From https://github.com/xmppjs/xmpp.js/tree/master/packages/client, the reconnect is automatically. But I would like to have some control for deciding when to reconnect and how long should I wait for next reconnect according to error packet type. Is it possible?
Thank you!