diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 0acc378c7..926d3fd0b 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -2093,6 +2093,13 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr return true; } + if (connman.OutboundTargetReached(false) && !pfrom->fWhitelisted) + { + LogPrint("net", "mempool request with bandwidth limit reached, disconnect peer=%d\n", pfrom->GetId()); + pfrom->fDisconnect = true; + return true; + } + LOCK(pfrom->cs_inventory); pfrom->fSendMempool = true; }