Sfoglia il codice sorgente

daemon/cluster: add a missing Unlock

Signed-off-by: Ziheng Liu <lzhfromustc@gmail.com>
Ziheng Liu 5 anni fa
parent
commit
83c0bedba9
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  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()