Skip to content

Commit

Permalink
Merge pull request #135 from csgofloat/fix/relogin-proxy-timeout
Browse files Browse the repository at this point in the history
Relogin on Proxy Timeout (during Steam maintenance)
  • Loading branch information
Step7750 authored Apr 20, 2023
2 parents b641649 + c6f28e2 commit 26a0e21
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 26a0e21

Please sign in to comment.