Faster puller loop

This commit is contained in:
Jakob Borg
2014-07-24 09:38:16 +02:00
parent 2aa4340551
commit 5087d02fba
3 changed files with 89 additions and 117 deletions

View File

@@ -584,8 +584,10 @@ func sendIndexes(conn protocol.Connection, repo string, fs *files.Set) {
}()
for err == nil {
if !initial && fs.LocalVersion(protocol.LocalNodeID) <= minLocalVer {
time.Sleep(1 * time.Second)
if !initial {
time.Sleep(5 * time.Second)
}
if fs.LocalVersion(protocol.LocalNodeID) <= minLocalVer {
continue
}