I hereby claim:
- I am skwair on github.
- I am skwair (https://keybase.io/skwair) on keybase.
- I have a public key ASCLu3W-ojFUHrk-et665iSiM4y4AwlsLGWEyYOHTMPXVAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
// shutdown adds a context.Context to the GracefulStop method of | |
// grpc.Server, allowing to set a timeout before calling Stop. | |
func shutdown(ctx context.Context, s *grpc.Server) error { | |
ok := make(chan struct{}) | |
// NOTE: GracefulStop will return instantly | |
// when Stop it called, preventing this | |
// goroutine from leaking. | |
go func() { | |
s.GracefulStop() | |
close(ok) |