mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
idk is that work
This commit is contained in:
1 parent
48bebc950d
commit
fdd3789898
2 files changed
+196
-74
No files matched your search
+14
-2
@@ -1332,10 +1332,22 @@ export default class Player extends EventEmitter {
|
||||
|
||||
} catch (e) {
|
||||
const causeStr = e.cause ? ` (Cause: ${e.cause})` : "";
|
||||
logger.error("[Player] Join failed:", e.message, causeStr);
|
||||
const joinMsg = String(e?.message ?? e ?? "");
|
||||
const isPermissionJoinFailure =
|
||||
joinMsg.includes("401") ||
|
||||
joinMsg.includes("Unauthorized") ||
|
||||
joinMsg.includes("no permissions to access the room") ||
|
||||
joinMsg.includes("signal failure: client error") ||
|
||||
joinMsg.includes("active 401 cooldown");
|
||||
|
||||
if (isPermissionJoinFailure) {
|
||||
logger.warn(`[Player] Join blocked for ${channelId}: ${joinMsg}`);
|
||||
} else {
|
||||
logger.error("[Player] Join failed:", joinMsg, causeStr);
|
||||
}
|
||||
|
||||
// Track the disconnect reason for smarter recovery decisions
|
||||
if (e.message?.includes("401") || e.message?.includes("Unauthorized")) {
|
||||
if (joinMsg.includes("401") || joinMsg.includes("Unauthorized")) {
|
||||
this._lastDisconnectReason = "401";
|
||||
this._lastDisconnectTime = Date.now();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user