Code Review
/
src
/
xds
/
xds-agent.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Increase timeout for Syncthing startup.
[src/xds/xds-agent.git]
/
main.go
diff --git
a/main.go
b/main.go
index
44dda71
..
d3722e2
100644
(file)
--- 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)
// 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
}
for retry > 0 {
if err := ctx.SThg.Connect(); err == nil {
break
}
- ctx.Log.Infof("Establishing connection to Syncthing (retry %d/
10)", r
etry)
+ ctx.Log.Infof("Establishing connection to Syncthing (retry %d/
%d", retry, maxR
etry)
time.Sleep(time.Second)
retry--
}
time.Sleep(time.Second)
retry--
}