Skip to content

Commit 5576adc

Browse files
committed
refactor: Prioritize websocket transport for socket connection
1 parent b8aff00 commit 5576adc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

frontend/src/services/socketService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export const socketService = {
122122
reconnectionDelay: 1000, // Start with 1s delay
123123
reconnectionDelayMax: 5000, // Max 5s delay
124124
timeout: 20000, // Increase connection timeout
125-
transports: ['polling', 'websocket'],
125+
transports: ['websocket', 'polling'], // Prioritize WebSocket
126126
path: '/api/socket.io/' // Use /api prefix for socket.io
127127
});
128128
// --- ADD LOG ---

0 commit comments

Comments
 (0)