Skip to content

Commit 0d2984b

Browse files
committed
Improve socket reconnection settings
1 parent 2be0ec8 commit 0d2984b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

web/src/hooks/useSocketIO.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ export function useSocketIO({
4040
token: sessionToken
4141
},
4242
reconnection: true,
43-
reconnectionAttempts: 2,
44-
reconnectionDelay: 10000,
43+
reconnectionAttempts: 5,
44+
reconnectionDelay: 1000,
45+
reconnectionDelayMax: 5000,
46+
randomizationFactor: 0.5,
4547
transports: ['websocket'],
4648
timeout: 20000,
4749
path: configs.SOCKET_ENDPOINT

0 commit comments

Comments
 (0)