summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/internal/http2/core.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js
index 11d677c5f6..95ce8bcdb4 100644
--- a/lib/internal/http2/core.js
+++ b/lib/internal/http2/core.js
@@ -2152,14 +2152,11 @@ function processHeaders(oldHeaders) {
return headers;
}
-function onFileCloseError(stream, err) {
- stream.emit(err);
-}
function onFileUnpipe() {
const stream = this.sink[kOwner];
if (stream.ownsFd)
- this.source.close().catch(onFileCloseError.bind(stream));
+ this.source.close().catch(stream.destroy.bind(stream));
else
this.source.releaseFD();
}