Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ronag opened this issue Jun 1, 2019 · 0 comments
Closed

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

ronag opened this issue Jun 1, 2019 · 0 comments
Labels
http2 Issues or PRs related to the http2 subsystem.

Comments

@ronag
Copy link
Member

ronag commented Jun 1, 2019

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.

@lpinca lpinca added the http2 Issues or PRs related to the http2 subsystem. label Jun 2, 2019
rexagod added a commit to rexagod/node that referenced this issue Jun 16, 2020
codebytere pushed a commit that referenced this issue Jun 27, 2020
Fixes: #28001

PR-URL: #33911
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
codebytere pushed a commit that referenced this issue Jun 30, 2020
Fixes: #28001

PR-URL: #33911
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
codebytere pushed a commit that referenced this issue Jul 10, 2020
Fixes: #28001

PR-URL: #33911
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
codebytere pushed a commit that referenced this issue Jul 12, 2020
Fixes: #28001

PR-URL: #33911
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
codebytere pushed a commit that referenced this issue Jul 14, 2020
Fixes: #28001

PR-URL: #33911
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
http2 Issues or PRs related to the http2 subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants