Some debug prints in the puller loop skips

This commit is contained in:
Jakob Borg 2014-10-03 17:55:03 +02:00
parent 0bb31e16c9
commit 87764445e8

View File

@ -111,6 +111,10 @@ loop:
// device A to device B, so we have something to work against. // device A to device B, so we have something to work against.
case <-pullTimer.C: case <-pullTimer.C:
if !initialScanCompleted { if !initialScanCompleted {
// How did we even get here?
if debug {
l.Debugln(p, "skip (initial)")
}
pullTimer.Reset(nextPullIntv) pullTimer.Reset(nextPullIntv)
continue continue
} }
@ -118,6 +122,9 @@ loop:
// RemoteLocalVersion() is a fast call, doesn't touch the database. // RemoteLocalVersion() is a fast call, doesn't touch the database.
curVer := p.model.RemoteLocalVersion(p.folder) curVer := p.model.RemoteLocalVersion(p.folder)
if curVer == prevVer { if curVer == prevVer {
if debug {
l.Debugln(p, "skip (curVer == prevVer)", prevVer)
}
pullTimer.Reset(checkPullIntv) pullTimer.Reset(checkPullIntv)
continue continue
} }