forked from ChrisChrome/weather-bot
add logging to start error
This commit is contained in:
parent
5ea2ad9701
commit
c1af1a7839
4
index.js
4
index.js
|
@ -126,8 +126,8 @@ xmpp.on("online", async (address) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const start = () => {
|
const start = () => {
|
||||||
xmpp.start().catch(() => {
|
xmpp.start().catch((err) => {
|
||||||
console.error("start failed, trying again in a few seconds");
|
console.error(`start failed, ${err}\nGonna try again in 5 seconds...`);
|
||||||
xmpp.stop();
|
xmpp.stop();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
start();
|
start();
|
||||||
|
|
Loading…
Reference in a new issue