mirror of
https://github.com/clearlinux/docker.git
synced 2026-08-26 09:36:04 +00:00
Fix send on closed channel bug
Signed-off-by: Chun Chen <chenchun.feed@gmail.com>
(cherry picked from commit a408790de8)
This commit is contained in:
committed by
Jessica Frazelle
parent
7ffbd7eaee
commit
84b21b55b9
@@ -68,6 +68,7 @@ func (p *Publisher) Publish(v interface{}) {
|
||||
func (p *Publisher) Close() {
|
||||
p.m.Lock()
|
||||
for sub := range p.subscribers {
|
||||
delete(p.subscribers, sub)
|
||||
close(sub)
|
||||
}
|
||||
p.m.Unlock()
|
||||
|
||||
Reference in New Issue
Block a user