1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 14:48:55 +00:00

Fix containerds stomping on each other

This commit is contained in:
Darren Shepherd
2016-06-15 16:33:27 -07:00
parent e98fc80d12
commit e1a63c80f3
8 changed files with 61 additions and 16 deletions

View File

@@ -31,6 +31,7 @@ func (s *Subscription) SetPid(pid int) {
s.exit = exit
s.wg.Done()
Unsubscribe(s)
break
}
}
}()
@@ -61,7 +62,10 @@ func Unsubscribe(sub *Subscription) {
subLock.Lock()
defer subLock.Unlock()
delete(subscriptions, sub.id)
if _, ok := subscriptions[sub.id]; ok {
close(sub.c)
delete(subscriptions, sub.id)
}
}
func Start() error {