mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-12-13 19:37:43 +00:00
📝 output log when server shutdown is failed
This commit is contained in:
@@ -236,8 +236,11 @@ func RunServer(
|
|||||||
defer close(serverShutdownCh)
|
defer close(serverShutdownCh)
|
||||||
<-stopCh
|
<-stopCh
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), shutDownTimeout)
|
ctx, cancel := context.WithTimeout(context.Background(), shutDownTimeout)
|
||||||
server.Shutdown(ctx)
|
defer cancel()
|
||||||
cancel()
|
err := server.Shutdown(ctx)
|
||||||
|
if err != nil {
|
||||||
|
klog.Errorf("Failed to shutdown server: %v", err)
|
||||||
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
|
|||||||
Reference in New Issue
Block a user