Fix Socket.IO client fallback order

This commit is contained in:
px 2026-04-14 19:12:32 +09:30
parent 3b8b369492
commit 07285e17b5
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

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