drop earlier if delayed queue is semi-full

This commit is contained in:
orignal 2024-02-01 18:55:10 -05:00
parent 96cf6ca531
commit 8f28cee32f

View File

@ -477,7 +477,10 @@ namespace transport
}
}
for (auto& it1: msgs)
it->second.delayedMessages.push_back (it1);
if (sz > MAX_NUM_DELAYED_MESSAGES/2 && it1->onDrop)
it1->Drop (); // drop earlier because we can handle it
else
it->second.delayedMessages.push_back (it1);
}
else
{