mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 11:38:15 +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)
|
||||
<-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
Block a user