X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=main.go;h=32083bbd41045c000486cc999a3c74a580984b7a;hb=fd312d109f78dd5b9825e8f1dae255d847a76f7a;hp=44dda71735866dd1e7dcd93357eb57b62f0dfb2c;hpb=32bf4cb0c949f44343849607d0439a61d1e6ea49;p=src%2Fxds%2Fxds-agent.git diff --git a/main.go b/main.go index 44dda71..32083bb 100644 --- a/main.go +++ b/main.go @@ -66,12 +66,13 @@ func xdsAgent(cliCtx *cli.Context) error { // Establish connection with local Syncthing (retry if connection fail) time.Sleep(3 * time.Second) - retry := 10 + maxRetry := 30 + retry := maxRetry for retry > 0 { if err := ctx.SThg.Connect(); err == nil { break } - ctx.Log.Infof("Establishing connection to Syncthing (retry %d/10)", retry) + ctx.Log.Infof("Establishing connection to Syncthing (retry %d/%d)", retry, maxRetry) time.Sleep(time.Second) retry-- }