From a3fff86ed854585c25b473139a16062856ba45a1 Mon Sep 17 00:00:00 2001 From: skiffer-git <44203734@qq.com> Date: Fri, 8 Mar 2024 15:27:26 +0800 Subject: [PATCH] add context deadline exceeded --- tools/component/component.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/component/component.go b/tools/component/component.go index e3b5b1956..ef7efe487 100644 --- a/tools/component/component.go +++ b/tools/component/component.go @@ -111,10 +111,11 @@ func main() { checks[index].flag = true } component.ErrorPrint(fmt.Sprintf("Starting %s failed:%v.", check.name, errs.Unwrap(err).Error())) - if !strings.Contains(errs.Unwrap(err).Error(), "connection refused") && - !strings.Contains(errs.Unwrap(err).Error(), "timeout waiting") { - component.ErrorPrint("Some components started failed!") - os.Exit(-1) + if strings.Contains(errs.Unwrap(err).Error(), "connection refused") || + strings.Contains(errs.Unwrap(err).Error(), "timeout") || + strings.Contains(errs.Unwrap(err).Error(), "context deadline exceeded") { + component.ErrorPrint("try check connection") + continue } } else { checks[index].flag = true