Repository navigation
Cannot reuse a TLS socket for a HTTP2 session #33343
Description
Activity
The latest code does not reproduce this issue.
What latest code? Do you mean Node.js master branch?
Yes, it may have been fixed in some commit, I didn't reproduce this issue in macOS v10.14.
Indeed, it's fixed on the master branch. Feel free to close the issue, but I'd prefer to keep this open until there's a release that fixes it.
Closing since a fix has been released a while ago.
I ran into this too. I've done some quick tests with the repro above, and:
- I can reproduce this in the latest Node 12 (12.18.3)
- I can't reproduce this in Node 14.3+. It fails in 14.1 & 14.2, but seems to be fixed from that point onwards. I've specifically tested 14.3, 14.6 and 14.8 (the latest release).
Doing some digging through the changelog, looks like this is the fix: #33209.
That hasn't yet been backported to v12 though. It'd be great if that could be included in the next v12 release to get this fixed, since it causes some big problems for lots of interesting HTTP/2 use cases (like detecting HTTP/2 support during TLS setup, as in https://github.com/szmarczak/http2-wrapper/). I'm not sure where to get started with making that happen, but maybe @addaleax can help?
Same here, I tested v8.17.0, v10.22.0, v12.18.3, v14.8.0, and only v12.18.3 could reproduce this problem.
see my reproduce: https://github.com/fenying/nodejs-bug-code-h2-binding
This is a really serious bug, could it please be opened up? cc @addaleax
Especially serious since 12 is LTS. My
fetch-h2package, which is relatively well used is totally broken because of this.@grantila Correct me if I’m wrong, but based on the conversation above, backporting #33209 to v12.x would fix this, right? I’ll open a backport PR as suggested over there, there isn’t really anything to do here in the issue anymore. If there’s still problems with backporting, feel free to help with debugging those
@grantila Also, I might be wrong, but if the fix works, then
socket.on('secureConnect', () => socket.secureConnecting = false);should be a functional workaround.I'll be damned, it does work @addaleax, thanks!
- added a commit that references this issue
on Aug 20, 2020
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Always.
What is the expected behavior?
What do you see instead?
Additional information
Reference: #16256