Skip to content

Commit

Permalink
Drop percentage of active connections instead of total number of conn…
Browse files Browse the repository at this point in the history
…ections

Reviewed By: meleshuk

Differential Revision: D49917045

fbshipit-source-id: fb12d12c2e8b79742c1c826789e74fb984763dc6
  • Loading branch information
Giorgi Papakerashvili authored and facebook-github-bot committed Oct 13, 2023
1 parent c48b9a4 commit 4cb1e0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wangle/acceptor/ConnectionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ void ConnectionManager::dropConnections(double pct) {
void ConnectionManager::dropEstablishedConnections(
double pct,
const std::function<bool(ManagedConnection*)>& filter) {
const size_t N = conns_.size();
const size_t N = getNumActiveConnections();
auto front = conns_.iterator_to(conns_.front());
if (idleIterator_ == front || N == 0) {
return;
Expand Down

0 comments on commit 4cb1e0e

Please sign in to comment.