Merge pull request #295 from pxjx22/fix/socketio-polling-fallback
Fix Socket.IO client fallback order
This commit is contained in:
commit
6b70d7331c
2 changed files with 9 additions and 1 deletions
8
tests/test_websocket_client_transport.py
Normal file
8
tests/test_websocket_client_transport.py
Normal 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
|
||||
|
|
@ -278,7 +278,7 @@ function initializeWebSocket() {
|
|||
}
|
||||
|
||||
socket = io({
|
||||
transports: ['websocket', 'polling'],
|
||||
transports: ['polling', 'websocket'],
|
||||
reconnection: true,
|
||||
reconnectionAttempts: Infinity,
|
||||
reconnectionDelay: 1000,
|
||||
|
|
|
|||
Loading…
Reference in a new issue