first start recorder, then listen on websockets

This commit is contained in:
2022-09-13 20:10:11 +02:00
parent 46c8883ea9
commit 73e8d4eabb

View File

@@ -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);