- Close/Disconnect after an error

This commit is contained in:
Christopher Cookman 2024-05-12 01:50:13 -06:00
parent 83b210783a
commit b2615c7b21
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42

View file

@ -485,6 +485,8 @@ const start = () => {
process.exit(1);
}
console.log(`${colors.red("[ERROR]")} XMPP failed to start: ${err}. Trying again in 5 seconds...`);
xmpp.close();
xmpp.disconnect();
setTimeout(() => {
start();
}, 5000);