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
11 changed files with 73 additions and 190 deletions

View File

@@ -58,7 +58,7 @@ func (s *Server) Start(ctx context.Context) {
s.tcpEntryPoints.Start()
s.watcher.Start()
s.routinesPool.Go(s.listenSignals)
s.routinesPool.GoCtx(s.listenSignals)
}
// Wait blocks until the server shutdown.
@@ -90,7 +90,7 @@ func (s *Server) Close() {
stopMetricsClients()
s.routinesPool.Cleanup()
s.routinesPool.Stop()
signal.Stop(s.signals)
close(s.signals)