Skip to content

Commit

Permalink
Add missing reader.cancel to streamBody
Browse files Browse the repository at this point in the history
  • Loading branch information
kitten committed Mar 14, 2023
1 parent bc8b587 commit 7924a49
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/core/src/internal/fetchSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ async function* streamBody(response: Response): AsyncIterableIterator<string> {
const reader = response.body!.getReader();
let result: ReadableStreamReadResult<ChunkData>;
while (!(result = await reader.read()).done) yield toString(result.value);
await reader.cancel();
}
}

Expand Down

0 comments on commit 7924a49

Please sign in to comment.