mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 23:52:06 +00:00
fix(nitro): terminate active worker before replacing (#1302)
This commit is contained in:
parent
b421c81e84
commit
d1214c9aae
@ -44,6 +44,9 @@ export function createDevServer (nitroContext: NitroContext) {
|
||||
worker.on('message', (event) => {
|
||||
if (event && event.port) {
|
||||
workerAddress = 'http://localhost:' + event.port
|
||||
if (activeWorker) {
|
||||
activeWorker.terminate()
|
||||
}
|
||||
activeWorker = worker
|
||||
pendingWorker = null
|
||||
resolve(workerAddress)
|
||||
|
Loading…
Reference in New Issue
Block a user