first start recorder, then listen on websockets
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user