mirror of https://github.com/vacp2p/nim-libp2p.git
don't throw on missing peer
This commit is contained in:
parent
3b9d34116d
commit
f190c155d3
|
@ -88,7 +88,7 @@ proc rpcHandler(f: FloodSub,
|
|||
|
||||
# forward the message to all peers interested in it
|
||||
for p in toSendPeers:
|
||||
if f.peers[p].id != peer.id:
|
||||
if p in f.peers and f.peers[p].id != peer.id:
|
||||
await f.peers[p].send(@[RPCMsg(messages: m.messages)])
|
||||
|
||||
proc handleConn(f: FloodSub,
|
||||
|
|
Loading…
Reference in New Issue