mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #38906 from thaJeztah/carry_38304_fix_swarm_leave_hanging
Fix for situation where swarm leave causes wait forever for agent to stop
This commit is contained in:
commit
06c9ae1327
1 changed files with 5 additions and 0 deletions
|
@ -298,6 +298,11 @@ func (n *nodeRunner) Stop() error {
|
|||
n.cancelReconnect = nil
|
||||
}
|
||||
if n.swarmNode == nil {
|
||||
// even though the swarm node is nil we still may need
|
||||
// to send a node leave event to perform any cleanup required.
|
||||
if n.cluster != nil {
|
||||
n.cluster.SendClusterEvent(lncluster.EventNodeLeave)
|
||||
}
|
||||
n.mu.Unlock()
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue