Skip to content

Commit

Permalink
fix(core): timeout the disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
Cammisuli committed Mar 9, 2023
1 parent 3bbe4b0 commit 8e7f82f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/nx/src/daemon/client/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,11 @@ export class DaemonClient {
return this.queue
.sendToQueue(() => this.sendMessageToDaemon(messageToDaemon))
.then((value) => {
if (this.queue.isEmpty()) {
this.closeConnection();
}
setTimeout(() => {
if (this.queue.isEmpty()) {
this.closeConnection();
}
}, 0);
return value;
});
}
Expand Down

0 comments on commit 8e7f82f

Please sign in to comment.