fix: correct the transport protocol check (#6576)

This commit is contained in:
Zuo Zongyuan 2024-08-13 02:07:02 +08:00 committed by GitHub
parent dd1231cc55
commit 44024e8a5f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -837,7 +837,7 @@ exports.reloadSettings = () => {
exports.skinName = 'colibris';
}
if (!exports.socketTransportProtocols.includes("websocket") || exports.socketTransportProtocols.includes("polling")) {
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'];
}