MCPcopy
hub / github.com/hapijs/hapi / _close

Method _close

lib/response.js:648–670  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 3

headers.jsFile · 0.80
_finalizeMethod · 0.80
_setResponseMethod · 0.80

Calls 2

drainMethod · 0.80
_logMethod · 0.45

Tested by

no test coverage detected