mirror of
https://github.com/bingohuang/docker-labs.git
synced 2025-10-05 18:03:21 +08:00
Omit race conditions and update swarm info events
This commit is contained in:
@@ -9,6 +9,8 @@ func (c checkSwarmStatusTask) Run(i *Instance) {
|
||||
if info, err := GetDaemonInfo(i); err == nil {
|
||||
if info.Swarm.LocalNodeState != swarm.LocalNodeStateInactive && info.Swarm.LocalNodeState != swarm.LocalNodeStateLocked {
|
||||
i.IsManager = &info.Swarm.ControlAvailable
|
||||
} else {
|
||||
i.IsManager = nil
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user