From 73e8d4eabb4675449568078923a5c9e4c607ab35 Mon Sep 17 00:00:00 2001 From: ericek111 Date: Tue, 13 Sep 2022 20:10:11 +0200 Subject: [PATCH] first start recorder, then listen on websockets --- server/MhdMapApp.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/MhdMapApp.js b/server/MhdMapApp.js index 96aa838..1839ef8 100644 --- a/server/MhdMapApp.js +++ b/server/MhdMapApp.js @@ -23,14 +23,14 @@ export default class MhdMapApp { } async start() { + await this.recorder.start(); + this.websockets.on('join', ws => { this.sendAction(ws, 'updateStops', this.stops); this.sendAction(ws, 'updateVehicles', this.vehicles); }); this.websockets.on('message', this._onWsMessage.bind(this)); - await this.recorder.start(); - setInterval(() => { this.updateStatic(); }, 1000 * 60 * 60 * 24);