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:
6
vendor/github.com/docker/containerd/subreaper/reaper.go
generated
vendored
6
vendor/github.com/docker/containerd/subreaper/reaper.go
generated
vendored
@@ -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 {
|
||||
|
Reference in New Issue
Block a user