Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@microsoft/rush",
"comment": "[rush-serve-plugin] Allow the Rush process to exit if the server is the only active handle.",
"type": "none"
}
],
"packageName": "@microsoft/rush"
}
3 changes: 3 additions & 0 deletions rush-plugins/rush-serve-plugin/src/phasedCommandHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ export async function phasedCommandHandler(options: IPhasedCommandHandlerOptions
webSocketServerUpgrader?.(server);

server.listen(requestedPort);
// Don't let the HTTP/2 server keep the process alive if the user asks to quit.
// TODO: use some "user wants to exit" event to close the server.
server.unref();
await once(server, 'listening');

const address: AddressInfo | undefined = server.address() as AddressInfo;
Expand Down
Loading