This commit is contained in:
dr-frmr 2024-10-04 17:33:22 -04:00
parent 4ab5403208
commit 8f28f5486c
No known key found for this signature in database

View File

@ -55,7 +55,7 @@ impl State {
fn update_all_fds_limits(&mut self) {
let len = self.fds_limits.len() as u64;
let per_process_limit = self.max_fds / len;
let per_process_limit = self.max_fds / std::cmp::max(len, 1);
for limit in self.fds_limits.values_mut() {
limit.limit = per_process_limit;
// reset hit count when updating limits