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:
Doug Davis 2016-02-29 13:51:10 -08:00
parent b43a2c21c4
commit 4dc645bb8a
1 changed files with 1 additions and 1 deletions

View File

@ -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
}