From bad0cccee80c02fa309f274220f6d324d03c3b19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Fri, 27 Sep 2024 18:07:46 +0900 Subject: [PATCH] fix: call `this.hot.close` for non-ws HotChannel (#18212) --- packages/vite/src/node/server/environment.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vite/src/node/server/environment.ts b/packages/vite/src/node/server/environment.ts index 980f1d98f8f83f..3bedc2bdb3ba2d 100644 --- a/packages/vite/src/node/server/environment.ts +++ b/packages/vite/src/node/server/environment.ts @@ -208,7 +208,7 @@ export class DevEnvironment extends BaseEnvironment { this.pluginContainer.close(), this.depsOptimizer?.close(), // WebSocketServer is independent of HotChannel and should not be closed on environment close - isWebSocketServer in this.hot ? this.hot.close() : Promise.resolve(), + isWebSocketServer in this.hot ? Promise.resolve() : this.hot.close(), (async () => { while (this._pendingRequests.size > 0) { await Promise.allSettled(