mirror of https://github.com/docker/docs.git
Add missing 'defer'
as it stands now the lock at this spot in the code is pretty useless. All it does it block us but since we release the lock before we check e.state its a roadblock with no real purpose. One could argue that a lock isn't needed at all but I think having it there for consistency with the other funcs would be good. Signed-off-by: Doug Davis <dug@us.ibm.com>
This commit is contained in:
parent
b43a2c21c4
commit
4dc645bb8a
|
|
@ -231,7 +231,7 @@ func (e *Engine) isConnected() bool {
|
|||
// IsHealthy returns true if the engine is healthy
|
||||
func (e *Engine) IsHealthy() bool {
|
||||
e.RLock()
|
||||
e.RUnlock()
|
||||
defer e.RUnlock()
|
||||
return e.state == stateHealthy
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue