From 8f42bfa675cd2b0c3126caf51368cf35687699b4 Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Thu, 18 Sep 2025 18:59:47 -0400 Subject: [PATCH] [skip ci] Better handling for lounge lost sessions --- CHANGELOG.md | 1 + .../src/components/Services/LoungeService/LongPoller.bs | 2 +- .../src/components/Services/LoungeService/LoungeService.bs | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16fa8c4d..4f74e0dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Try fetching multiple pages in the search, in case results are filtered out (e.g. shorts) - Regression for `Attempt to play the next video when errors occur` +- Better handling for lounge lost sessions ## [0.41.13] - 2025-09-18 diff --git a/playlet-lib/src/components/Services/LoungeService/LongPoller.bs b/playlet-lib/src/components/Services/LoungeService/LongPoller.bs index d7667d85..0d58d949 100644 --- a/playlet-lib/src/components/Services/LoungeService/LongPoller.bs +++ b/playlet-lib/src/components/Services/LoungeService/LongPoller.bs @@ -198,7 +198,7 @@ class LongPoller m.status_code = Val(statusCode) m.status_text = status.Mid(spaceIndex + 1) if m.status_code <> 200 - if m.status_code = 400 and m.status_text = "Unknown SID" + if m.status_code = 410 or (m.status_code = 400 and m.status_text = "Unknown SID") LogErrorNoTelemetry("Invalid status code:", m.status_code, m.status_text, `\nResponse data:`, m.socket_buffer) else LogError("Invalid status code:", m.status_code, m.status_text, `\nResponse data:`, m.socket_buffer) diff --git a/playlet-lib/src/components/Services/LoungeService/LoungeService.bs b/playlet-lib/src/components/Services/LoungeService/LoungeService.bs index 2b2f510a..db184603 100644 --- a/playlet-lib/src/components/Services/LoungeService/LoungeService.bs +++ b/playlet-lib/src/components/Services/LoungeService/LoungeService.bs @@ -123,14 +123,14 @@ function LoungeServiceLoop() as void unknownSid = false ' TODO:P2 move this check somewhere else - if api.poller.status_code = 400 and ValidString(api.poller.status_text) = "Unknown SID" + if (api.poller.status_code = 410) or (api.poller.status_code = 400 and ValidString(api.poller.status_text) = "Unknown SID") api.poller.status_code = 0 unknownSid = true end if if not unknownSid for each result in outgoingLoungeMessagesResults - if result.status = 400 and result.error.InStr("Unknown SID") <> -1 + if result.status = 410 or (result.status = 400 and result.error.InStr("Unknown SID") <> -1) unknownSid = true exit for end if