mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-18 18:17:03 +00:00
RetentionJoin() could block if scanner never started
This commit is contained in:
@@ -2,7 +2,11 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
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
|
### Added
|
||||||
- Inbucket now builds with Go 1.5 or 1.6
|
- Inbucket now builds with Go 1.5 or 1.6
|
||||||
- Project can build & run inside a Docker container
|
- Project can build & run inside a Docker container
|
||||||
|
|||||||
@@ -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
|
// RetentionJoin does not retun until the retention scanner has shut down
|
||||||
func RetentionJoin() {
|
func RetentionJoin() {
|
||||||
select {
|
if retentionShutdown != nil {
|
||||||
case _ = <-retentionShutdown:
|
select {
|
||||||
|
case _ = <-retentionShutdown:
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user