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 http server graceful shutdown #571

Merged
merged 1 commit into from
May 17, 2024
Merged

fix http server graceful shutdown #571

merged 1 commit into from
May 17, 2024

Conversation

phosae
Copy link
Contributor

@phosae phosae commented May 16, 2024

as golang's http doc point out

ListenAndServe always returns a non-nil error. After Shutdown or Close

log.Fatal(httpSrv.ListenAndServe()) will cause server exit immediately with code 1, without waiting 5s for graceful shutdown.

Copy link
Owner

@mtlynch mtlynch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@mtlynch mtlynch merged commit ef57614 into mtlynch:master May 17, 2024
9 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators May 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants