diff --git a/apps/t3/src/cli.ts b/apps/t3/src/cli.ts index ed2e7bfddc..cce8646c6c 100644 --- a/apps/t3/src/cli.ts +++ b/apps/t3/src/cli.ts @@ -745,6 +745,9 @@ function startStaticWebServer(distRoot: string, port: number) { }); const stream = fs.createReadStream(targetPath); + response.on("close", () => { + stream.destroy(); + }); stream.on("error", () => { if (!response.headersSent) { respondText(404, "Not found");