Skip to content

Commit

Permalink
fix: call this.hot.close for non-ws HotChannel (#18212)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red authored Sep 27, 2024
1 parent 2d148e3 commit bad0ccc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/server/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit bad0ccc

Please sign in to comment.