From 59090242f95ebbdc06f8c8a85edfb52c41debd49 Mon Sep 17 00:00:00 2001 From: Lucas Date: Fri, 3 Jul 2026 10:02:04 +0200 Subject: [PATCH] Fix login hanging indefinitely on steam-session timeout Modern login in components/login.js listens for 'authenticated' and 'error' events from steam-session's LoginSession, but not the 'timeout' event. When loginTimeout (default 30s) elapses, steam-session emits 'timeout' and calls cancelLoginAttempt() without emitting an 'error' event, causing the Promise to never settle and the login callback to never be called. Add a 'timeout' event listener that rejects the Promise with a descriptive error. --- components/login.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/login.js b/components/login.js index 6eceded..6071ac5 100644 --- a/components/login.js +++ b/components/login.js @@ -68,6 +68,10 @@ SteamCommunity.prototype._modernLogin = function(logOnDetails) { reject(err); }); + session.on('timeout', () => { + reject(new Error('Login timed out')); + }); + try { let startResult = await session.startWithCredentials({ accountName: logOnDetails.accountName,