Auto-reconnect to event stream after 20secs timeout

This commit is contained in:
Deluan
2020-11-09 15:13:32 -05:00
parent 2b1a5f579a
commit 56803d0151
7 changed files with 40 additions and 26 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ import createAdminStore from './store/createAdminStore'
import { i18nProvider } from './i18n'
import config from './config'
import { startEventStream } from './eventStream'
import { updateScanStatus } from './actions'
import { processEvent } from './actions'
const history = createHashHistory()
if (config.gaTrackingId) {
@@ -59,7 +59,7 @@ const App = () => (
const Admin = (props) => {
const dispatch = useDispatch()
startEventStream((data) => dispatch(updateScanStatus(data)))
startEventStream((data) => dispatch(processEvent(data)))
return (
<RAAdmin