Small bugfix

This commit is contained in:
2025-10-24 16:21:04 +02:00
parent 02391f813b
commit 7ce9003621
21 changed files with 601 additions and 10 deletions

View File

@@ -8,6 +8,9 @@ export class CameraRunner {
socket: Socket;
errorTriggerStartupDelay = 10000;
bootTime = Date.now();
state: ServiceState = 'DISCONNECTED';
message?: string;
error?: string;
@@ -76,6 +79,12 @@ export class CameraRunner {
this.state = state;
this.broadcastState();
if (
error != null &&
Date.now() - this.bootTime > this.errorTriggerStartupDelay
)
this._Main.Twilio.sendError('CameraRunner', error);
if (state == 'FAILED' || state == 'DISCONNECTED')
console.warn(PREFIX, message ?? error);
else console.log(PREFIX, message ?? error);
@@ -147,6 +156,7 @@ export class CameraRunner {
});
this.socket.on('connect', () => {
this._Main.Twilio.resetError('CameraRunner');
this.setInfo('Connected', null, 'CONNECTED');
this.startPollClock();
});