mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 03:57:41 +00:00
Merge pull request #128890 from kei01234kei/output_log_when_server_shutdown_is_failed
📝 output log when server shutdown is failed
This commit is contained in:
commit
516b2c2e41
@ -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() {
|
||||||
|
Loading…
Reference in New Issue
Block a user