mirror of
https://github.com/balzack/databag.git
synced 2025-02-14 12:39:17 +00:00
set reconnect backoff attempt to constant
This commit is contained in:
parent
1bc883aa58
commit
3654e220d4
@ -17,7 +17,6 @@ export function useAppContext() {
|
|||||||
const [state, setState] = useState({});
|
const [state, setState] = useState({});
|
||||||
const [appRevision, setAppRevision] = useState();
|
const [appRevision, setAppRevision] = useState();
|
||||||
|
|
||||||
const delay = useRef(2);
|
|
||||||
const ws = useRef(null);
|
const ws = useRef(null);
|
||||||
const revision = useRef(null);
|
const revision = useRef(null);
|
||||||
|
|
||||||
@ -158,11 +157,8 @@ export function useAppContext() {
|
|||||||
ws.current.onopen = () => {}
|
ws.current.onopen = () => {}
|
||||||
ws.current.onerror = () => {}
|
ws.current.onerror = () => {}
|
||||||
setWebsocket(token);
|
setWebsocket(token);
|
||||||
if (delay.current < 15) {
|
|
||||||
delay.current += 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}, delay.current * 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
ws.current.onopen = () => {
|
ws.current.onopen = () => {
|
||||||
ws.current.send(JSON.stringify({ AppToken: token }))
|
ws.current.send(JSON.stringify({ AppToken: token }))
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { useEffect, useRef } from 'react';
|
import { useRef } from 'react';
|
||||||
import { ConversationWrapper, StatusError } from './Conversation.styled';
|
import { ConversationWrapper, StatusError } from './Conversation.styled';
|
||||||
import { ExclamationCircleOutlined, SettingOutlined, CloseOutlined } from '@ant-design/icons';
|
import { ExclamationCircleOutlined, SettingOutlined, CloseOutlined } from '@ant-design/icons';
|
||||||
import ReactResizeDetector from 'react-resize-detector';
|
import ReactResizeDetector from 'react-resize-detector';
|
||||||
|
Loading…
Reference in New Issue
Block a user