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: implement ref() and unref() on client sessions #16617

Closed
mcollina opened this issue Oct 30, 2017 · 3 comments
Closed

http2: implement ref() and unref() on client sessions #16617

mcollina opened this issue Oct 30, 2017 · 3 comments
Labels
http2 Issues or PRs related to the http2 subsystem.

Comments

@mcollina
Copy link
Member

  • Version: master, 8.8.1
  • Platform: all
  • Subsystem: http2

Currently the client sessions cannot be unref(), which means they will keep the process alive if they are not destroyed. Adding support for ref() and unref() (https://nodejs.org/api/net.html#net_socket_ref) would add the possibility to create some long-running clients for the life of the process.

@mcollina
Copy link
Member Author

cc @nodejs/http2

@mcollina mcollina added the http2 Issues or PRs related to the http2 subsystem. label Oct 30, 2017
@addaleax
Copy link
Member

So … a question; right now, this effectively is about the ref’edness of the uv_prepare_t that is used to send data at the beginning of an event loop iteration, and for the ref’edness of the underlying socket. Is that correct?

For the former, I think the solution we should be aiming for is to only have the handle be active if there actually is data to send, and I’d be glad to look into that.

@jasnell
Copy link
Member

jasnell commented Jan 8, 2018

This has been done

@jasnell jasnell closed this as completed Jan 8, 2018
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.

3 participants