From 4cd3e315dbc4de08d021d42aaf7dbc420ddfa32f Mon Sep 17 00:00:00 2001
From: Phil Pluckthun <phil@kitten.sh>
Date: Tue, 14 Mar 2023 18:45:56 +0000
Subject: [PATCH] Add missing reader.cancel call

---
 packages/core/src/internal/fetchSource.ts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/packages/core/src/internal/fetchSource.ts b/packages/core/src/internal/fetchSource.ts
index b97d943229..33bb321d41 100644
--- a/packages/core/src/internal/fetchSource.ts
+++ b/packages/core/src/internal/fetchSource.ts
@@ -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);
+    reader.cancel();
   }
 }