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

make the graceful HTTP stop example more concise #91

Merged
merged 1 commit into from
Oct 31, 2023
Merged

make the graceful HTTP stop example more concise #91

merged 1 commit into from
Oct 31, 2023

Conversation

mpldr
Copy link
Contributor

@mpldr mpldr commented Oct 29, 2023

Changes made in this example:

  • don't use a raw listener
  • remove irrelevant restart endpoint
  • make the counter thread-safe
  • also handles os signals
  • tries a graceful stop, and otherwise
  • don't embed muxer inside the handler
  • get rid of raw listener

Technically, the shutdown handler could use some more love, but I think it serves as a more adequate example.

@SimonWaldherr SimonWaldherr merged commit 74f5823 into SimonWaldherr:master Oct 31, 2023
1 check passed
@SimonWaldherr
Copy link
Owner

👍 thanks

@mpldr mpldr deleted the graceful-http-stop branch October 31, 2023 16:30
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

Successfully merging this pull request may close these issues.

2 participants