diff options
author | Tonis Tiigi <tonistiigi@gmail.com> | 2016-11-15 18:02:26 -0800 |
---|---|---|
committer | Tonis Tiigi <tonistiigi@gmail.com> | 2016-11-15 20:10:16 -0800 |
commit | 89b123473774248fc3a0356dd3ce5b116cc69b29 (patch) | |
tree | e3f4632fb34a978cccc31594136c252ae0933fbe /container | |
parent | 27c20a7ea0c61976241e0b5e54e0624cf2f1bffd (diff) | |
download | docker-89b123473774248fc3a0356dd3ce5b116cc69b29.tar.gz |
Fix deadlock on cancelling healthcheck
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Diffstat (limited to 'container')
-rw-r--r-- | container/health.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/container/health.go b/container/health.go index 81fae50456..6e3cd12f3b 100644 --- a/container/health.go +++ b/container/health.go @@ -42,10 +42,7 @@ func (s *Health) OpenMonitorChannel() chan struct{} { func (s *Health) CloseMonitorChannel() { if s.stop != nil { logrus.Debug("CloseMonitorChannel: waiting for probe to stop") - // This channel does not buffer. Once the write succeeds, the monitor - // has read the stop request and will not make any further updates - // to c.State.Health. - s.stop <- struct{}{} + close(s.stop) s.stop = nil logrus.Debug("CloseMonitorChannel done") } |