(opts, callback)
| 10684 | }, |
| 10685 | write: (chunk, encoding, callback) => { |
| 10686 | const { req } = this; |
| 10687 | if (req.push(chunk, encoding) || req._readableState.destroyed) { |
| 10688 | callback(); |
| 10689 | } else { |
| 10690 | req[kResume] = callback; |
| 10691 | } |
| 10692 | }, |
| 10693 | destroy: (err, callback) => { |
| 10694 | const { body, req, res, ret, abort } = this; |
| 10695 | if (!err && !ret._readableState.endEmitted) { |
| 10696 | err = new RequestAbortedError(); |
| 10697 | } |
| 10698 | if (abort && err) { |
| 10699 | abort(); |
| 10700 | } |
| 10701 | util.destroy(body, err); |
| 10702 | util.destroy(req, err); |
| 10703 | util.destroy(res, err); |
| 10704 | removeSignal(this); |
| 10705 | callback(err); |
| 10706 | } |
| 10707 | }).on("prefinish", () => { |
| 10708 | const { req } = this; |
| 10709 | req.push(null); |
| 10710 | }); |
nothing calls this directly
no test coverage detected