()
| 646 | } |
| 647 | |
| 648 | _close() { |
| 649 | |
| 650 | if (this._state === 'close') { |
| 651 | return; |
| 652 | } |
| 653 | |
| 654 | this._state = 'close'; |
| 655 | |
| 656 | if (this._processors.close) { |
| 657 | try { |
| 658 | this._processors.close(this); |
| 659 | } |
| 660 | catch (err) { |
| 661 | Bounce.rethrow(err, 'system'); |
| 662 | this.request._log(['response', 'cleanup', 'error'], err); |
| 663 | } |
| 664 | } |
| 665 | |
| 666 | const stream = this._payload || this.source; |
| 667 | if (Streams.isStream(stream)) { |
| 668 | internals.Response.drain(stream); |
| 669 | } |
| 670 | } |
| 671 | |
| 672 | _isPayloadSupported() { |
| 673 |
no test coverage detected