1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-18 10:07:02 +00:00

Clean up datastore related linter findings

This commit is contained in:
James Hillyerd
2017-12-26 18:54:02 -08:00
parent f62eaa31b9
commit ac21675bd7
3 changed files with 30 additions and 9 deletions

View File

@@ -90,9 +90,9 @@ retentionLoop:
dur := time.Minute - since
log.Tracef("Retention scanner sleeping for %v", dur)
select {
case _ = <-rs.globalShutdown:
case <-rs.globalShutdown:
break retentionLoop
case _ = <-time.After(dur):
case <-time.After(dur):
}
}
// Kickoff scan
@@ -102,7 +102,7 @@ retentionLoop:
}
// Check for global shutdown
select {
case _ = <-rs.globalShutdown:
case <-rs.globalShutdown:
break retentionLoop
default:
}
@@ -159,9 +159,7 @@ func (rs *RetentionScanner) doScan() error {
// Join does not retun until the retention scanner has shut down
func (rs *RetentionScanner) Join() {
if rs.retentionShutdown != nil {
select {
case <-rs.retentionShutdown:
}
<-rs.retentionShutdown
}
}