From c6f28e2bcf5d9e7a1c44ab580005a2e9dfd715a0 Mon Sep 17 00:00:00 2001 From: Step7750 Date: Wed, 19 Apr 2023 18:38:26 -0600 Subject: [PATCH] Relogin on Proxy Timeout (during Steam maintenance) --- lib/bot.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/bot.js b/lib/bot.js index 067747f..041921f 100644 --- a/lib/bot.js +++ b/lib/bot.js @@ -104,6 +104,12 @@ class Bot extends EventEmitter { if (err.eresult && login_error_msgs[err.eresult] !== undefined) { winston.error(this.username + ': ' + login_error_msgs[err.eresult]); } + + // Yes, checking for string errors sucks, but we have no other attributes to check + // this error against. + if (err.toString().includes('Proxy connection timed out')) { + this.steamClient.relog(); + } }); this.steamClient.on('disconnected', (eresult, msg) => {