📝 output log when server shutdown is failed
Kubernetes-commit: dd1300df98682f524a2f028e3b296b3e8783a711
This commit is contained in:
parent
47024d970a
commit
753940e964
|
@ -236,8 +236,11 @@ func RunServer(
|
|||
defer close(serverShutdownCh)
|
||||
<-stopCh
|
||||
ctx, cancel := context.WithTimeout(context.Background(), shutDownTimeout)
|
||||
server.Shutdown(ctx)
|
||||
cancel()
|
||||
defer cancel()
|
||||
err := server.Shutdown(ctx)
|
||||
if err != nil {
|
||||
klog.Errorf("Failed to shutdown server: %v", err)
|
||||
}
|
||||
}()
|
||||
|
||||
go func() {
|
||||
|
|
Loading…
Reference in New Issue