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

Fire shutdown callback only after closing all connections #7

Open
rmdm opened this issue May 9, 2017 · 1 comment
Open

Fire shutdown callback only after closing all connections #7

rmdm opened this issue May 9, 2017 · 1 comment

Comments

@rmdm
Copy link

rmdm commented May 9, 2017

Currently, shutdown callback called almost immediately after calling server.shutdown() (by process.nextTick). It seems that more desirable behaviour would be to wait for all connections to close to give shutdown-handling code better idea on when to close other resources that may be further used by not yet closed connections.

@CapnSpellcheck
Copy link

New to this stuff, but my interpretation is that it's called as part of the server.close callback, which means it's called after the "server is finally closed". After initiating the close, this code then does it manual tweaking of idle sockets, thus helping the server.close to finish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants