Simplify usage reporting config options (fixes #370)

This commit is contained in:
Jakob Borg
2014-06-17 23:22:19 +02:00
parent d09c71b688
commit b05fcbc9d7
8 changed files with 49 additions and 46 deletions

View File

@@ -415,11 +415,11 @@ nextRepo:
}
}
if cfg.Options.UREnabled && cfg.Options.URAccepted < usageReportVersion {
if cfg.Options.URAccepted > 0 && cfg.Options.URAccepted < usageReportVersion {
l.Infoln("Anonymous usage report has changed; revoking acceptance")
cfg.Options.UREnabled = false
cfg.Options.URAccepted = 0
}
if cfg.Options.UREnabled {
if cfg.Options.URAccepted >= usageReportVersion {
go usageReportingLoop(m)
go func() {
time.Sleep(10 * time.Minute)