Set inputShouldShow to false when all websockets disconnect (#224)

This commit is contained in:
Declan Freeman-Gleason
2021-01-09 16:35:42 -08:00
committed by GitHub
parent 15c687655a
commit 0a4dcd17e0
3 changed files with 12 additions and 3 deletions

View File

@@ -86,9 +86,16 @@ public class SocketHandler {
users.remove(context);
if (users.size() == 0) {
logger.info("All websocket connections are closed. Setting inputShouldShow to false.");
// cameraIndex -1 means the event is received by all cameras
dcService.publishEvent(
new IncomingWebSocketEvent<>(
DataChangeDestination.DCD_ACTIVEPIPELINESETTINGS, "inputShouldShow", false));
DataChangeDestination.DCD_ACTIVEPIPELINESETTINGS,
"inputShouldShow",
false,
-1,
null));
}
}