Make eventStream connection/reconnection more reliable

Also more logs on the server
This commit is contained in:
Deluan
2020-11-20 20:22:22 -05:00
parent c8c95bfb47
commit 3e8bee4f65
4 changed files with 121 additions and 61 deletions
+6 -2
View File
@@ -26,7 +26,7 @@ import {
import createAdminStore from './store/createAdminStore'
import { i18nProvider } from './i18n'
import config from './config'
import { startEventStream } from './eventStream'
import { setDispatch, startEventStream } from './eventStream'
const history = createHashHistory()
@@ -60,7 +60,11 @@ const App = () => (
const Admin = (props) => {
const dispatch = useDispatch()
if (config.devActivityMenu) {
startEventStream(dispatch)
setDispatch(dispatch)
authProvider
.checkAuth()
.then(() => startEventStream())
.catch(() => {}) // ignore if not logged in
}
return (