Merge pull request #295 from pxjx22/fix/socketio-polling-fallback

Fix Socket.IO client fallback order
This commit is contained in:
BoulderBadgeDad 2026-04-17 13:12:22 -07:00 committed by GitHub
commit 6b70d7331c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View file

@ -0,0 +1,8 @@
from pathlib import Path
def test_websocket_client_prefers_polling_before_websocket():
script_path = Path(__file__).resolve().parents[1] / "webui" / "static" / "script.js"
script = script_path.read_text()
assert "transports: ['polling', 'websocket']" in script

View file

@ -278,7 +278,7 @@ function initializeWebSocket() {
}
socket = io({
transports: ['websocket', 'polling'],
transports: ['polling', 'websocket'],
reconnection: true,
reconnectionAttempts: Infinity,
reconnectionDelay: 1000,