Fixed heatbeat message not being valid json; now includes unix time too.

This commit is contained in:
Werner Kroneman 2024-12-08 17:46:49 +01:00
parent 077fb751b5
commit d0cb08c2df

View file

@ -211,7 +211,8 @@ export default class Stream extends EventEmitter<StreamEvents> implements IStrea
}
public heartbeat(): void {
this.stream.send('h');
// Send a heartbeat message, with the current time so the server can echo it.
this.send('hb', { time: Date.now() });
}
/**