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

fix: explicitly close grpc client connection #209

Merged
merged 1 commit into from
Aug 18, 2022

Conversation

richardcase
Copy link
Member

What this PR does / why we need it:

When calling flintlock we where not explicitly closing the client
connection to the grpc server. As a result a goroutine is kept alive for
each client request and the number continue to rise until the server
can't accept any more requests.

This change will explicitly call Close for the underlying grpc client
connection which helps to ensure server side resource usage is kept to a
minimum.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Relates liquidmetal-dev/flintlock#503

Special notes for your reviewer:

Checklist:

  • squashed commits into logical changes

@richardcase richardcase added the kind/bug Something isn't working label Aug 18, 2022
Callisto13
Callisto13 previously approved these changes Aug 18, 2022
@richardcase richardcase force-pushed the fix_grpc_connection_close branch 3 times, most recently from ec342e2 to dcd7332 Compare August 18, 2022 14:15
When calling flintlock we where not explicitly closing the client
connection to the grpc server. As a result a goroutine is kept alive for
each client request and the number continue to rise until the server
can't accept any more requests.

This change will explicitly call `Close` for the underlying grpc client
connection which helps to ensure server side resource usage is kept to a
minimum.

Signed-off-by: Richard Case <richard.case@outlook.com>
@richardcase richardcase force-pushed the fix_grpc_connection_close branch from dcd7332 to c9ad8c8 Compare August 18, 2022 14:21
@yitsushi yitsushi changed the title fix: eplicitly close grpc client connection fix: explicitly close grpc client connection Aug 18, 2022
@richardcase richardcase merged commit 8c6b50d into main Aug 18, 2022
@richardcase richardcase deleted the fix_grpc_connection_close branch August 18, 2022 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants