server: immediately return to caller when processing sendToPeer

This commit alters the logic of processing sendToPeer requests within
the server to immediately return to the caller after locating the
target peer.
This commit is contained in:
Olaoluwa Osuntokun committed 2017-02-02 16:57:25 -08:00
1 parent 3f6afa51b9
commit c1c1cabc4e
1 file changed
+2 -2
+2 -2
View File
@@ -640,11 +640,11 @@ out:
}
s.peersMtx.RUnlock()
sMsg.errChan <- nil
for _, msg := range sMsg.msgs {
targetPeer.queueMsg(msg, nil)
}
sMsg.errChan <- nil
}()
case query := <-s.queries:
switch msg := query.(type) {