not increasing reconnect backoff

This commit is contained in:
Roland Osborne 2022-10-10 12:03:03 -07:00
parent f95265e688
commit 40eb654f82

View File

@ -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 }))