From a65b1c9062841c80a1be7901b313110c3daea9b4 Mon Sep 17 00:00:00 2001 From: Kim De Mey Date: Sat, 16 Sep 2023 16:06:11 +0200 Subject: [PATCH] Do not accept new offers if our contentQueue is full (#1753) --- fluffy/network/wire/portal_protocol.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fluffy/network/wire/portal_protocol.nim b/fluffy/network/wire/portal_protocol.nim index cbc8a3f96..75f99d19b 100644 --- a/fluffy/network/wire/portal_protocol.nim +++ b/fluffy/network/wire/portal_protocol.nim @@ -369,7 +369,7 @@ proc handleOffer(p: PortalProtocol, o: OfferMessage, srcId: NodeId): seq[byte] = return @[] let connectionId = - if contentKeysBitList.countOnes() != 0: + if contentKeysBitList.countOnes() != 0 and not p.stream.contentQueue.full(): p.stream.addContentOffer(srcId, contentKeys) else: # When the node does not accept any of the content offered, reply with an