Skip to content

Commit c7bafc4

Browse files
authored
Merge pull request #1001 from scramjetorg/fix/faster-health
Immediately send loadCheck to cmp when available
2 parents 222bdd6 + 56e9a8d commit c7bafc4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/host/src/lib/cpm-connector.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,6 @@ export class CPMConnector extends TypedEmitter<Events> {
255255

256256
this.logger.info(`${EOL}${EOL}\t\x1b[33m${this.config.id} connected to ${this.cpmId}\x1b[0m${EOL} `);
257257

258-
await this.setLoadCheckMessageSender();
259-
260258
StringStream.from(duplex.input as Readable)
261259
.JSONParse()
262260
.map(async (message: EncodedControlMessage) => {
@@ -299,6 +297,8 @@ export class CPMConnector extends TypedEmitter<Events> {
299297
this.communicationStream = new StringStream().JSONStringify().resume();
300298
this.communicationStream.pipe(duplex.output);
301299

300+
await this.setLoadCheckMessageSender();
301+
302302
this.communicationStream.on("pause", () => {
303303
this.logger.warn("Communication stream paused");
304304
});

0 commit comments

Comments
 (0)