diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js index f2a298b6e5df69..518ffca5553ed4 100644 --- a/lib/internal/http2/core.js +++ b/lib/internal/http2/core.js @@ -1489,7 +1489,7 @@ function closeStream(stream, code, rstStreamStatus = kSubmitRstStream) { if (!ending) { // If the writable side of the Http2Stream is still open, emit the // 'aborted' event and set the aborted flag. - if (!stream.aborted) { + if (!stream.aborted && !stream.state.localClose) { state.flags |= STREAM_FLAGS_ABORTED; stream.emit('aborted'); }