Wire remote player reconnect delay

This commit is contained in:
2026-08-08 16:29:38 +01:00
parent 5a08ccddbb
commit 38565a533d
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -25,6 +25,7 @@ async function start() {
const isRemotePlayer = Boolean(BRIDGE_PUBLIC_URL);
const PLAYER_INTERNAL_URL = String(isRemotePlayer ? BRIDGE_PUBLIC_URL : (process.env.PLAYER_INTERNAL_URL || PLAYER_PUBLIC_URL || process.env.PLAYER_BASE_URL || '')).trim().replace(/\/$/, '');
const PLAYER_DEVICE_ID = getConfiguredPlayerIdentifier();
const PLAYER_AGENT_RECONNECT_DELAY_MS = Number(process.env.PLAYER_AGENT_RECONNECT_DELAY_MS || 5000);
const ASSET_DIR = path.join(__dirname, 'player', 'public');
const MEDIA_DIR = path.join(__dirname, '..', 'media');
const ONBOARDING_QUEUE_FILE = path.join(MEDIA_DIR, 'player-onboarding-queue.json');
@@ -356,7 +357,7 @@ async function start() {
socket.on('close', function () {
clearTimers();
thinClientSocket = null;
reconnectTimer = setTimeout(connect, 5000);
reconnectTimer = setTimeout(connect, PLAYER_AGENT_RECONNECT_DELAY_MS);
});
socket.on('error', function () {