Skip to content

http compat won't always call callback on end method #28001

Closed
@ronag

Description

@ronag

See, https://github.com/nodejs/node/blob/master/lib/internal/http2/compat.js#L651

  end(chunk, encoding, cb) {
    const stream = this[kStream];
    const state = this[kState];

    if ((state.closed || state.ending) &&
        state.headRequest === stream.headRequest) {
      return this;
    }
    ...

This code will never call cb (inside the condition) causing a potential deadlock.

Metadata

Metadata

Assignees

No one assigned

    Labels

    http2Issues or 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