Function
cancelResponseBody
(body: HttpBody.HttpBody)
Source from the content-addressed store, hash-verified
| 514 | } |
| 515 | |
| 516 | const cancelResponseBody = (body: HttpBody.HttpBody): Effect.Effect<void> => { |
| 517 | const stream = (body as any).body |
| 518 | if ((body._tag === "Raw" || body._tag === "Uint8Array") && stream instanceof ReadableStream) { |
| 519 | return Effect.ignoreCause(Effect.promise(() => stream.cancel())) |
| 520 | } |
| 521 | return Effect.void |
| 522 | } |
| 523 | |
| 524 | const emptyReadableStream = new ReadableStream<Uint8Array>({ |
| 525 | start(controller) { |
Tested by
no test coverage detected