fix: Fallback to websocket and polling when unknown(old) config is present for socket io (#6497)

This commit is contained in:
SamTV12345 2024-07-07 19:25:14 +02:00 committed by GitHub
parent d202ccd178
commit 16c5b33549
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -826,6 +826,11 @@ exports.reloadSettings = () => {
exports.skinName = 'colibris'; 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" // checks if skinName has an acceptable value, otherwise falls back to "colibris"
if (exports.skinName) { if (exports.skinName) {
const skinBasePath = path.join(exports.root, 'src', 'static', 'skins'); const skinBasePath = path.join(exports.root, 'src', 'static', 'skins');