Skip to content

Commit

Permalink
fix: do not end process in middleware mode, fix #4196 (#4232)
Browse files Browse the repository at this point in the history
  • Loading branch information
IanVS committed Jul 13, 2021
1 parent 732d60c commit 1c994f8
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 1c994f8

Please sign in to comment.