Skip to content

Commit

Permalink
fix problem that on finished is not called on mh browse (#2472)
Browse files Browse the repository at this point in the history
* fix problem that on finished is not called on mh browse

- closes #2471

* rm comment
  • Loading branch information
foxriver76 authored Oct 6, 2023
1 parent 6d30dbe commit a115ba2
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/cli/src/lib/setup/multihostClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,15 @@ export class MHClient {
timeout = timeout || 2_000;

this.timer = setTimeout(() => {
this.stopServer();

if (this.server) {
this.stopServer();
onFinished();
}
}, timeout);

this.server.on('error', err => {
this.stopServer();

if (this.server) {
this.stopServer();
onFinished(err);
}
});
Expand All @@ -121,7 +119,6 @@ export class MHClient {
});

this.server.on('listening', () => {
// var address = server.address();
if (isBroadcast) {
this.server!.setBroadcast(true);
}
Expand Down

0 comments on commit a115ba2

Please sign in to comment.