fix kubemark flushlogs not working together with os.Exit()

Signed-off-by: kerthcet <kerthcet@gmail.com>
This commit is contained in:
kerthcet
2021-10-08 18:54:31 +08:00
parent 1123a7041e
commit 722489db36
2 changed files with 19 additions and 16 deletions

View File

@@ -132,8 +132,9 @@ func NewHollowProxyOrDie(
}, nil
}
func (hp *HollowProxy) Run() {
func (hp *HollowProxy) Run() error {
if err := hp.ProxyServer.Run(); err != nil {
klog.Fatalf("Error while running proxy: %v\n", err)
return fmt.Errorf("Error while running proxy: %w", err)
}
return nil
}