()
| 394 | if (unreadable) return fail(unreadable) |
| 395 | this.streamed = true |
| 396 | const flush = () => { |
| 397 | const chunks = exchange.chunks |
| 398 | for (const chunk of chunks) { |
| 399 | if (chunk === "") continue |
| 400 | const bytes = this.bytes(chunk) |
| 401 | if (!(bytes instanceof Uint8Array)) return fail(bytes) |
| 402 | Queue.offerUnsafe(queue, bytes) |
| 403 | } |
| 404 | // Release consumed chunks from long-lived streams. |
| 405 | chunks.length = 0 |
| 406 | if (exchange.error === null) Queue.endUnsafe(queue) |
| 407 | else if (exchange.error !== undefined) { |
| 408 | fail(this.failed(exchange.error)) |
| 409 | } |
| 410 | } |
| 411 | exchange.listeners.add(flush) |
| 412 | flush() |
| 413 | return flush |
nothing calls this directly
no test coverage detected