1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2026-01-09 04:31:55 +00:00

RetentionJoin() could block if scanner never started

This commit is contained in:
James Hillyerd
2016-03-05 19:18:17 -08:00
parent 629bb65cec
commit e99baf766b
2 changed files with 9 additions and 3 deletions

View File

@@ -133,8 +133,10 @@ func doRetentionScan(ds DataStore, maxAge time.Duration, sleep time.Duration) er
// RetentionJoin does not retun until the retention scanner has shut down
func RetentionJoin() {
select {
case _ = <-retentionShutdown:
if retentionShutdown != nil {
select {
case _ = <-retentionShutdown:
}
}
}