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:
parent
3f6afa51b9
commit
c1c1cabc4e
@ -640,11 +640,11 @@ out:
|
|||||||
}
|
}
|
||||||
s.peersMtx.RUnlock()
|
s.peersMtx.RUnlock()
|
||||||
|
|
||||||
|
sMsg.errChan <- nil
|
||||||
|
|
||||||
for _, msg := range sMsg.msgs {
|
for _, msg := range sMsg.msgs {
|
||||||
targetPeer.queueMsg(msg, nil)
|
targetPeer.queueMsg(msg, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
sMsg.errChan <- nil
|
|
||||||
}()
|
}()
|
||||||
case query := <-s.queries:
|
case query := <-s.queries:
|
||||||
switch msg := query.(type) {
|
switch msg := query.(type) {
|
||||||
|
Loading…
Reference in New Issue
Block a user