Skip to content

Commit

Permalink
fix(server): remove restart guard on restart (#13789)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored Jul 11, 2023
1 parent 8ead116 commit 2a38ef7
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions packages/vite/src/node/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -854,9 +854,7 @@ async function restartServer(server: ViteDevServer) {

await server.close()

// prevent new server `restart` function from calling
newServer._restartPromise = server._restartPromise

// Assign new server props to existing server instance
Object.assign(server, newServer)

const {
Expand All @@ -883,9 +881,6 @@ async function restartServer(server: ViteDevServer) {
shortcutsOptions.print = false
bindShortcuts(newServer, shortcutsOptions)
}

// new server (the current server) can restart now
newServer._restartPromise = null
}

async function updateCjsSsrExternals(server: ViteDevServer) {
Expand Down

0 comments on commit 2a38ef7

Please sign in to comment.