fix: unify stream cleanup and async request ownership

This commit is contained in:
手瓜一十雪 committed 2026-10-18 13:20:22 +08:00
1 parent 9b165a8971
commit fb39af6c28
13 files changed
+667 -461

No files matched your search

+2 -1
View File
@@ -43,11 +43,12 @@ export function sseResponse(
closed = true;
clearInterval(heartbeat);
signal.removeEventListener('abort', onAbort);
cleanups.splice(0).forEach(cleanup);
if (closeStream) {
controller.close();
}
cleanups.splice(0).forEach(cleanup);
};
const onAbort = () => teardown();