Просмотр исходного кода

Merge pull request #40604 from thaJeztah/19.03_backport_mis_unlock

[19.03 backport] daemon/cluster: add a missing Unlock
Akihiro Suda 5 лет назад
Родитель
Сommit
71373c6105
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      daemon/cluster/swarm.go

+ 1 - 0
daemon/cluster/swarm.go

@@ -33,6 +33,7 @@ func (c *Cluster) Init(req types.InitRequest) (string, error) {
 			// API handlers to finish before shutting down the node.
 			c.mu.Lock()
 			if !c.nr.nodeState.IsManager() {
+				c.mu.Unlock()
 				return "", errSwarmNotManager
 			}
 			c.mu.Unlock()