Merge pull request #14379 from farazdagi/fix/deadlock-in-node-wait

node: fixes deadlock on Wait()
This commit is contained in:
Péter Szilágyi 2017-04-25 18:47:55 +03:00 committed by GitHub
commit 8dce4c283d

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