diff options
author | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2017-05-31 12:24:12 +0200 |
---|---|---|
committer | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2017-05-31 12:24:12 +0200 |
commit | 61cd1a97e20d58e77470610cb8ee0bd2d5b6d395 (patch) | |
tree | 026f81296d2b22fc97158c6df2e2e640812c69b2 /main.go | |
parent | 7a5db7b760787842823f80b6921f35ae6d27b4fc (diff) |
Increase timeout for Syncthing startup.v0.0.1-alpha
Syncthing may take more time to start for example on slow network connection.
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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-- } |