Skip to content

http2: Http2Stream#close() sends no RST_STREAM when an 'aborted' listener destroys the stream #66306

Description

@jasnell

Found while investigating an undici bug...

closeStream() sets STREAM_FLAGS_CLOSED, then emits 'aborted' synchronously before calling finishCloseStream(). If a listener destroys the stream, _destroy() skips its own RST because this.closed is already true, and destroys the handle. submitRstStream() then finds no handle and no RST_STREAM is sent. The peer's stream stays open until the session closes.

stream.pipeline(src, http2Stream) triggers this by itself: Http2Stream has autoDestroy: false, so eos listens for 'aborted' and destroys on it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues and PRs for confirmed bugs.http2Issues and PRs related to the http2 subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions