node: fixes deadlock on Wait()

This commit is contained in:
Victor Farazdagi 2017-04-25 18:04:02 +03:00
parent ba3bcd16a6
commit 5f7eb78918
1 changed files with 1 additions and 0 deletions

View File

@ -536,6 +536,7 @@ func (n *Node) Stop() error {
func (n *Node) Wait() {
n.lock.RLock()
if n.server == nil {
n.lock.RUnlock()
return
}
stop := n.stop