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:
@@ -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:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user