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

Added custom sleep before we initiate shutdown #1

Merged
merged 1 commit into from
Feb 2, 2021

Conversation

jonaz
Copy link
Owner

@jonaz jonaz commented Feb 1, 2021

To mimic kubernetes preStop

@@ -10,24 +10,41 @@ import (
"time"
)

func NewServerWithTimeout(t time.Duration) (*http.Server, chan struct{}) {
var testQuit chan os.Signal

Choose a reason for hiding this comment

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

Copy link
Owner Author

@jonaz jonaz Feb 2, 2021

Choose a reason for hiding this comment

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

I found this that i could be sent to the wrong thread so i did not want to use that.
golang/go#19326

perhaps not an issue in this case but...

@jonaz jonaz merged commit 900241b into master Feb 2, 2021
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.

3 participants