File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed
Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -976,7 +976,7 @@ static bool AttemptToEvictConnection(bool fPreferNewConnection) {
976976 // Protect the 64 nodes which have been connected the longest.
977977 // This replicates the existing implicit behavior.
978978 std::sort (vEvictionCandidates.begin (), vEvictionCandidates.end (), ReverseCompareNodeTimeConnected);
979- vEvictionCandidates.erase (vEvictionCandidates.end () - std::min (64 , static_cast <int >(vEvictionCandidates.size ())), vEvictionCandidates.end ());
979+ vEvictionCandidates.erase (vEvictionCandidates.end () - std::min (static_cast < int >(vEvictionCandidates. size () / 2 ) , static_cast <int >(vEvictionCandidates.size ())), vEvictionCandidates.end ());
980980
981981 if (vEvictionCandidates.empty ())
982982 return false ;
You can’t perform that action at this time.
0 commit comments