- Close/Disconnect after an error
This commit is contained in:
parent
83b210783a
commit
b2615c7b21
2
index.js
2
index.js
|
@ -485,6 +485,8 @@ const start = () => {
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
console.log(`${colors.red("[ERROR]")} XMPP failed to start: ${err}. Trying again in 5 seconds...`);
|
console.log(`${colors.red("[ERROR]")} XMPP failed to start: ${err}. Trying again in 5 seconds...`);
|
||||||
|
xmpp.close();
|
||||||
|
xmpp.disconnect();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
start();
|
start();
|
||||||
}, 5000);
|
}, 5000);
|
||||||
|
|
Loading…
Reference in a new issue