Do not accept new offers if our contentQueue is full (#1753)
This commit is contained in:
parent
cd1d370543
commit
a65b1c9062
|
@ -369,7 +369,7 @@ proc handleOffer(p: PortalProtocol, o: OfferMessage, srcId: NodeId): seq[byte] =
|
||||||
return @[]
|
return @[]
|
||||||
|
|
||||||
let connectionId =
|
let connectionId =
|
||||||
if contentKeysBitList.countOnes() != 0:
|
if contentKeysBitList.countOnes() != 0 and not p.stream.contentQueue.full():
|
||||||
p.stream.addContentOffer(srcId, contentKeys)
|
p.stream.addContentOffer(srcId, contentKeys)
|
||||||
else:
|
else:
|
||||||
# When the node does not accept any of the content offered, reply with an
|
# When the node does not accept any of the content offered, reply with an
|
||||||
|
|
Loading…
Reference in New Issue