-
Notifications
You must be signed in to change notification settings - Fork 654
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
Connections remain open after shut down #1080
Comments
That |
Thank you @murgatroid99, I will verify this tomorrow. |
@murgatroid99 I believe there should be an API that allows users to close the created server. Unref-ing only works if users intend to exit the entire process, but that might not always be the case. |
First, this is about client connections. Servers are handled differently. Second, connections are automatically closed if no open clients are using them, and clients can be explicitly closed. And third, this issue is about things holding the process open. If the user doesn't want to close the process, there's no issue. |
s/server/client/ Sorry, it was late in my time zone 🙃 I have a similar issue with Firestore and “connections are automatically closed if no open clients are using them” is in contradiction with googleapis/nodejs-firestore#769 (comment). Could you elaborate on it a little more? |
Does “using” mean that you have to close the client, or just don’t perform any operations? |
I mean that connections are closed if no clients hold references to them. But since connections are also unrefed as long as there are no active requests, they still shouldn't hold the process open. I am also describing the functionality of the latest version of grpc-js, which I believe had not been picked up by Firestore at the time that you filed the linked issue. |
Problem description
Connections remain open after invoking
tryShutdown
andforceShutdown
in tests.Reproduction steps
Which produces the following output:
Our tests require reconnecting with grpc. Unfortunately we cannot reliably test this because the connection remains open after shutting down.
Edit: The
setInterval
created insubchannel-pool
is never cleaned up. It could maybe be fixed by clearing the interval when the pool is empty and starting it again when there is 0 < channelTargets.Environment
The text was updated successfully, but these errors were encountered: