Commit 5f7eb789 authored by Victor Farazdagi's avatar Victor Farazdagi

node: fixes deadlock on Wait()

parent ba3bcd16
...@@ -536,6 +536,7 @@ func (n *Node) Stop() error { ...@@ -536,6 +536,7 @@ func (n *Node) Stop() error {
func (n *Node) Wait() { func (n *Node) Wait() {
n.lock.RLock() n.lock.RLock()
if n.server == nil { if n.server == nil {
n.lock.RUnlock()
return return
} }
stop := n.stop stop := n.stop
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment