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

http2 stream.pushStream callback gets null #18490

Closed
grantila opened this issue Jan 31, 2018 · 2 comments
Closed

http2 stream.pushStream callback gets null #18490

grantila opened this issue Jan 31, 2018 · 2 comments
Labels
http2 Issues or PRs related to the http2 subsystem. question Issues that look for answers.

Comments

@grantila
Copy link

  • Version: 9.4.0
  • Platform: Darwin 17.3.0
  • Subsystem: http2

The callback cb in stream.pushStream( headers, options, cb ) gets null in 9.4.0 but a proper stream in 9.3.0. This is deep in a large complex code, haven't made a minimal reproducible example, sorry about that. The documentation says nothing about null being a possible value, causing crashes obviously.

I wonder if this is related to other issues that started to appear in 9.4.0, like #18176. Fishy things do happen in 9.4

@jasnell
Copy link
Member

jasnell commented Feb 1, 2018

Yes, this was a large change in the http2 API that landed in 9.4. The first argument passed to the callback is now either an Error or null and the push stream is now the second argument. This can happen in 9.4 because http2 is still experimental.

@jasnell jasnell added question Issues that look for answers. http2 Issues or PRs related to the http2 subsystem. labels Feb 1, 2018
@grantila
Copy link
Author

grantila commented Feb 2, 2018

Right, thanks. This is now correctly documented in 9.5.0.

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. question Issues that look for answers.
Projects
None yet
Development

No branches or pull requests

2 participants