diff --git a/CHANGELOG.md b/CHANGELOG.md index 0733183..89f7fc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,11 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). -## [1.1.0-rc1] +## [Unreleased] +### Fixed +- Shutdown hang in retention scanner + +## [1.1.0-rc1] - 2016-03-04 ### Added - Inbucket now builds with Go 1.5 or 1.6 - Project can build & run inside a Docker container diff --git a/smtpd/retention.go b/smtpd/retention.go index ea3642c..9331233 100644 --- a/smtpd/retention.go +++ b/smtpd/retention.go @@ -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: + } } }