diff --git a/radicle/src/io.rs b/radicle/src/io.rs index f1d8aa17..86a6db7e 100644 --- a/radicle/src/io.rs +++ b/radicle/src/io.rs @@ -14,6 +14,9 @@ pub fn set_file_limit(n: u64) -> io::Result { return Err(io::Error::last_os_error()); } } + if rlim.rlim_cur >= n { + return Ok(rlim.rlim_cur); + } // Set the soft limit to the given value, up to the hard limit. rlim.rlim_cur = n.min(rlim.rlim_max); unsafe {