mirror of
https://github.com/balzack/databag.git
synced 2025-04-22 09:35:16 +00:00
not increasing reconnect backoff
This commit is contained in:
parent
f95265e688
commit
40eb654f82
@ -22,7 +22,6 @@ export function useAppContext() {
|
||||
const card = useContext(CardContext);
|
||||
const channel = useContext(ChannelContext);
|
||||
|
||||
const delay = useRef(2);
|
||||
const ws = useRef(null);
|
||||
|
||||
const updateState = (value) => {
|
||||
@ -118,11 +117,8 @@ export function useAppContext() {
|
||||
ws.current.onopen = () => {}
|
||||
ws.current.onerror = () => {}
|
||||
setWebsocket(server, token);
|
||||
if (delay.current < 15) {
|
||||
delay.current += 1;
|
||||
}
|
||||
}
|
||||
}, delay.current * 1000)
|
||||
}, 1000)
|
||||
}
|
||||
ws.current.onopen = () => {
|
||||
ws.current.send(JSON.stringify({ AppToken: token }))
|
||||
|
Loading…
x
Reference in New Issue
Block a user