~xenrox/10man-ts3

c0cb2f4c7c9fc6f471aa35282e29c19131f745c0 — Thorben Günther 2 years ago e15ff83
Try to auto reconnect
1 files changed, 6 insertions(+), 0 deletions(-)

M app.ts
M app.ts => app.ts +6 -0
@@ 46,6 46,12 @@ teamspeak.on("ready", async () => {
    teamspeak.clientMove(whoami.clientId, channel[0].cid);
});

teamspeak.on("close", async () => {
    console.log("disconnected, trying to reconnect...");
    await teamspeak.reconnect(-1, 60000);
    console.log("reconnected!");
});

teamspeak.on("error", (e) => {
    console.log("Caught an error!");
    console.error(e);