X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=main.go;h=8d49babef23e1b7e069be6391d7de28392a6118e;hb=61cd1a97e20d58e77470610cb8ee0bd2d5b6d395;hp=49f36a5de2e69e63ae58357c05a6070beeb177fe;hpb=7a5db7b760787842823f80b6921f35ae6d27b4fc;p=src%2Fxds%2Fxds-server.git diff --git a/main.go b/main.go index 49f36a5..8d49bab 100644 --- a/main.go +++ b/main.go @@ -144,13 +144,14 @@ func xdsApp(cliCtx *cli.Context) error { // Establish connection with local Syncthing (retry if connection fail) fmt.Printf("Establishing connection with Syncthing...\n") time.Sleep(2 * time.Second) - retry := 10 + maxRetry := 30 + retry := maxRetry err = nil for retry > 0 { if err = ctx.SThg.Connect(); err == nil { break } - ctx.Log.Warningf("Establishing connection to Syncthing (retry %d/10)", retry) + ctx.Log.Warningf("Establishing connection to Syncthing (retry %d/%d)", retry, maxRetry) time.Sleep(time.Second) retry-- }