mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
daemon/cluster: add a missing Unlock
Signed-off-by: Ziheng Liu <lzhfromustc@gmail.com>
(cherry picked from commit 83c0bedba9
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
bb19f8cc90
commit
1e3971d556
1 changed files with 1 additions and 0 deletions
|
@ -33,6 +33,7 @@ func (c *Cluster) Init(req types.InitRequest) (string, error) {
|
||||||
// API handlers to finish before shutting down the node.
|
// API handlers to finish before shutting down the node.
|
||||||
c.mu.Lock()
|
c.mu.Lock()
|
||||||
if !c.nr.nodeState.IsManager() {
|
if !c.nr.nodeState.IsManager() {
|
||||||
|
c.mu.Unlock()
|
||||||
return "", errSwarmNotManager
|
return "", errSwarmNotManager
|
||||||
}
|
}
|
||||||
c.mu.Unlock()
|
c.mu.Unlock()
|
||||||
|
|
Loading…
Reference in a new issue