Skip to content

Commit

Permalink
fix(nsu-proxy): make login timeout less lenient
Browse files Browse the repository at this point in the history
  • Loading branch information
johnpyp committed Oct 25, 2024
1 parent 8145340 commit 0fac19f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
Binary file modified nsu-proxy/bun.lockb
Binary file not shown.
2 changes: 2 additions & 0 deletions nsu-proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"croner": "^8.1.2",
"disposablestack": "^1.1.6",
"hono": "^4.6.4",
"js-yaml": "^4.1.0",
"kysely": "^0.27.4",
"log-node": "^8.0.3",
"ofetch": "^1.4.1",
Expand All @@ -45,6 +46,7 @@
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@types/better-sqlite3": "^7.6.11",
"@types/js-yaml": "^4.0.9",
"@types/log": "^6.3.3",
"@types/node": "^22.7.5",
"@types/snappyjs": "^0.7.1",
Expand Down
3 changes: 2 additions & 1 deletion nsu-proxy/src/bot/bot-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export class BotManager {
this.logger.info(`Sync: Adding ${toAdd.length} accounts, removing ${toDelete.length} accounts`);

for (const acc of toAdd) {
this.logger.info(`Sync: Adding account - ${acc.username}`);
await this.addBot(acc);
}

Expand Down Expand Up @@ -171,7 +172,7 @@ export class BotManager {
try {
await bot.resetInitializeWithRetry({
baseSleepTime: 10_000,
maxRetries: 5,
maxRetries: 3,
});

// If successful, set status to READY
Expand Down
2 changes: 1 addition & 1 deletion nsu-proxy/src/steam/steam-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class SteamAdapter {
const loggedIn = this.pclient.waitFor({
event: "loggedOn",
opts: {
signal: AbortSignal.timeout(TEN_MINUETS),
signal: AbortSignal.timeout(STARTUP_TIMEOUT),
},
});

Expand Down

0 comments on commit 0fac19f

Please sign in to comment.