set reconnect backoff attempt to constant

This commit is contained in:
Roland Osborne 2022-10-28 10:07:58 -07:00
parent 1bc883aa58
commit 3654e220d4
2 changed files with 2 additions and 6 deletions

View File

@ -17,7 +17,6 @@ export function useAppContext() {
const [state, setState] = useState({});
const [appRevision, setAppRevision] = useState();
const delay = useRef(2);
const ws = useRef(null);
const revision = useRef(null);
@ -158,11 +157,8 @@ export function useAppContext() {
ws.current.onopen = () => {}
ws.current.onerror = () => {}
setWebsocket(token);
if (delay.current < 15) {
delay.current += 1;
}
}
}, delay.current * 1000)
}, 1000)
}
ws.current.onopen = () => {
ws.current.send(JSON.stringify({ AppToken: token }))

View File

@ -1,4 +1,4 @@
import { useEffect, useRef } from 'react';
import { useRef } from 'react';
import { ConversationWrapper, StatusError } from './Conversation.styled';
import { ExclamationCircleOutlined, SettingOutlined, CloseOutlined } from '@ant-design/icons';
import ReactResizeDetector from 'react-resize-detector';