Explorar o código

Merge pull request #40594 from sfzhu93/Mis_Unlock

daemon/cluster: add a missing Unlock
Brian Goff %!s(int64=5) %!d(string=hai) anos
pai
achega
40b2b4b083
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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()