diff --git a/daemon/cluster/swarm.go b/daemon/cluster/swarm.go index 727612c6f1..9614528f5c 100644 --- a/daemon/cluster/swarm.go +++ b/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()