Skip to content

Commit c7bc42b

Browse files
committed
fix: And again
1 parent cdfd217 commit c7bc42b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/back/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,8 +1506,10 @@ async function onFileServerRequestImages(pathname: string, url: URL, req: http.I
15061506
const index = state.fileServerDownloads.queue.findIndex(v => v.subPath === pathname);
15071507
if (index >= 0) {
15081508
const item = state.fileServerDownloads.queue[index];
1509-
item.res.writeHead(404);
1510-
item.res.end();
1509+
if (!item.res.writableEnded) {
1510+
item.res.writeHead(404);
1511+
item.res.end();
1512+
}
15111513
state.fileServerDownloads.queue.splice(index, 1);
15121514
}
15131515

0 commit comments

Comments
 (0)