From 16c5b3354953dfa4fc02439558fbb62813c1a7c4 Mon Sep 17 00:00:00 2001 From: SamTV12345 <40429738+SamTV12345@users.noreply.github.com> Date: Sun, 7 Jul 2024 19:25:14 +0200 Subject: [PATCH] fix: Fallback to websocket and polling when unknown(old) config is present for socket io (#6497) --- src/node/utils/Settings.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/node/utils/Settings.ts b/src/node/utils/Settings.ts index 4bf5f2d79..d7aa981e8 100644 --- a/src/node/utils/Settings.ts +++ b/src/node/utils/Settings.ts @@ -826,6 +826,11 @@ exports.reloadSettings = () => { exports.skinName = 'colibris'; } + if (!exports.socketTransportProtocols.includes("websocket") || exports.socketTransportProtocols.includes("polling")) { + logger.warn("Invalid socketTransportProtocols setting. Please check out settings.json.template and update your settings.json. Falling back to the default ['websocket', 'polling']."); + exports.socketTransportProtocols = ['websocket', 'polling']; + } + // checks if skinName has an acceptable value, otherwise falls back to "colibris" if (exports.skinName) { const skinBasePath = path.join(exports.root, 'src', 'static', 'skins');