Skip to content

Commit

Permalink
fix: do not end process in middleware mode, fix vitejs#4196 (vitejs#4232
Browse files Browse the repository at this point in the history
)
  • Loading branch information
IanVS authored and aleclarson committed Nov 8, 2021
1 parent f8793e7 commit 53e359e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vite/src/node/server/index.ts
Expand Up @@ -375,7 +375,7 @@ export async function createServer(
async close() {
process.off('SIGTERM', exitProcess)

if (process.env.CI !== 'true') {
if (!middlewareMode && process.env.CI !== 'true') {
process.stdin.off('end', exitProcess)
}

Expand Down Expand Up @@ -406,7 +406,7 @@ export async function createServer(

process.once('SIGTERM', exitProcess)

if (process.env.CI !== 'true') {
if (!middlewareMode && process.env.CI !== 'true') {
process.stdin.on('end', exitProcess)
}

Expand Down

0 comments on commit 53e359e

Please sign in to comment.