mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Re-send camera states after websocket disconnects and reconnects (#14847)
This commit is contained in:
parent
bc371acb3e
commit
15bd26c9b1
@ -69,7 +69,10 @@ function useValue(): useValueReturn {
|
||||
...prevState,
|
||||
...cameraStates,
|
||||
}));
|
||||
|
||||
if (Object.keys(cameraStates).length > 0) {
|
||||
setHasCameraState(true);
|
||||
}
|
||||
// we only want this to run initially when the config is loaded
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [wsState]);
|
||||
@ -93,6 +96,9 @@ function useValue(): useValueReturn {
|
||||
retain: false,
|
||||
});
|
||||
},
|
||||
onClose: () => {
|
||||
setHasCameraState(false);
|
||||
},
|
||||
shouldReconnect: () => true,
|
||||
retryOnError: true,
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user