From 83c0bedba914fa08c9d1f2fe1e47b38a3264777d Mon Sep 17 00:00:00 2001 From: Ziheng Liu Date: Tue, 25 Feb 2020 13:55:11 -0500 Subject: [PATCH] daemon/cluster: add a missing Unlock Signed-off-by: Ziheng Liu --- daemon/cluster/swarm.go | 1 + 1 file changed, 1 insertion(+) diff --git a/daemon/cluster/swarm.go b/daemon/cluster/swarm.go index a1f4a8306b..8b471137a8 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()