mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix send on closed channel bug
Signed-off-by: Chun Chen <chenchun.feed@gmail.com>
This commit is contained in:
parent
00b8fec75f
commit
a408790de8
1 changed files with 1 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue