(e)
| 421 | } while (this.#pendingWrite && this.#writable); |
| 422 | } |
| 423 | #error(e) { |
| 424 | if (("receivedBody" === this.#state) && this.#timer) { // completion not reported yet. report before handling error. |
| 425 | Timer.clear(this.#timer); |
| 426 | this.#done(); |
| 427 | } |
| 428 | |
| 429 | this.#state = "error"; |
| 430 | |
| 431 | try { |
| 432 | const current = this.#current; |
| 433 | this.#current = undefined; |
| 434 | current?.onDone?.call(current.request, new Error); |
| 435 | |
| 436 | while (this.#requests.length) { |
| 437 | const request = this.#requests.shift(); |
| 438 | request.onDone?.call(request.request, new Error); |
| 439 | } |
| 440 | this.#onError?.(e); |
| 441 | } |
| 442 | catch { |
| 443 | /* this space intentionally left blank */ |
| 444 | } |
| 445 | this.close(); |
| 446 | } |
| 447 | #done() { |
| 448 | this.#timer = undefined; |
| 449 |
no test coverage detected