diff options
author | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2017-05-31 12:24:23 +0200 |
---|---|---|
committer | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2017-05-31 12:24:23 +0200 |
commit | 62b67b5e764d8dacbb2783311d6c29ff9130c5ea (patch) | |
tree | 8a5a1dbb560deb72d32e6831403ce5280203d52e /main.go | |
parent | b300a0413e9658aa2d9ebe0d4cddadc51881112a (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
@@ -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-- } |