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

core: fix graceful stop #4865

Merged
merged 2 commits into from Dec 29, 2023
Merged

core: fix graceful stop #4865

merged 2 commits into from Dec 29, 2023

Conversation

calebdoxsey
Copy link
Contributor

@calebdoxsey calebdoxsey commented Dec 29, 2023

Summary

The current implementation of graceful stop for gRPC and HTTP doesn't work properly. It actually ends up shutting down immediately, but it was supposed to wait for 5 seconds to allow any active connections a chance to complete.

This PR adds two new ServeWithGracefulStop functions for gRPC and HTTP that should behave as expected.

Related issues

Fixes https://github.com/pomerium/internal/issues/1599

Checklist

  • reference any related issues
  • updated docs
  • updated unit tests
  • updated UPGRADING.md
  • add appropriate tag (improvement / bug / etc)
  • ready for review

@calebdoxsey calebdoxsey added bug Something isn't working backport 0-24-0 labels Dec 29, 2023
@calebdoxsey calebdoxsey requested a review from a team as a code owner December 29, 2023 16:44
@coveralls
Copy link

Coverage Status

coverage: 59.831% (+0.01%) from 59.817%
when pulling 2e41dba on cdoxsey/graceful-stop
into c9df515 on main.

@calebdoxsey calebdoxsey merged commit 7eb7861 into main Dec 29, 2023
13 checks passed
@calebdoxsey calebdoxsey deleted the cdoxsey/graceful-stop branch December 29, 2023 17:18
backport-actions-token bot pushed a commit that referenced this pull request Dec 29, 2023
* core/grpc: fix graceful stop

* core/http: add graceful stop serve
calebdoxsey added a commit that referenced this pull request Dec 29, 2023
core: fix graceful stop (#4865)

* core/grpc: fix graceful stop

* core/http: add graceful stop serve

Co-authored-by: Caleb Doxsey <cdoxsey@pomerium.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 0-24-0 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants