1
0
Fork 0

Fix kubernetes providers shutdown and clean safe.Pool

This commit is contained in:
Julien Salleyron 2020-02-03 17:56:04 +01:00 committed by GitHub
parent c80d53e7e5
commit 1b63c95c4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 73 additions and 190 deletions

View file

@ -3,6 +3,7 @@
package server
import (
"context"
"os/signal"
"syscall"
@ -13,10 +14,10 @@ func (s *Server) configureSignals() {
signal.Notify(s.signals, syscall.SIGUSR1)
}
func (s *Server) listenSignals(stop chan bool) {
func (s *Server) listenSignals(ctx context.Context) {
for {
select {
case <-stop:
case <-ctx.Done():
return
case sig := <-s.signals:
if sig == syscall.SIGUSR1 {