Skip to content

Commit

Permalink
Merge pull request moby#40594 from sfzhu93/Mis_Unlock
Browse files Browse the repository at this point in the history
daemon/cluster: add a missing Unlock
  • Loading branch information
cpuguy83 authored Feb 28, 2020
2 parents 38f52c9 + 83c0bed commit 40b2b4b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions daemon/cluster/swarm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 40b2b4b

Please sign in to comment.