mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2025-12-12 02:55:43 +00:00
Realtime UI - Prefer websocket then fallback to 'polling' mode, increase reconnecting retries.
This commit is contained in:
@@ -48,9 +48,9 @@ $(document).ready(function () {
|
|||||||
// Connect to Socket.IO on the same host/port, with path from template
|
// Connect to Socket.IO on the same host/port, with path from template
|
||||||
const socket = io({
|
const socket = io({
|
||||||
path: socketio_url, // This will be the path prefix like "/app/socket.io" from the template
|
path: socketio_url, // This will be the path prefix like "/app/socket.io" from the template
|
||||||
transports: ['polling', 'websocket'], // Try WebSocket but fall back to polling
|
transports: ['websocket', 'polling'],
|
||||||
reconnectionDelay: 1000,
|
reconnectionDelay: 3000,
|
||||||
reconnectionAttempts: 15
|
reconnectionAttempts: 25
|
||||||
});
|
});
|
||||||
|
|
||||||
// Connection status logging
|
// Connection status logging
|
||||||
|
|||||||
Reference in New Issue
Block a user