Revert "set fd limit when starting, up to threshold=65535"

This reverts commit 4c4b9ca428.
This commit is contained in:
zephyr
2022-05-22 12:33:14 +09:00
parent 4c4b9ca428
commit 16795cffb7
3 changed files with 3 additions and 4 deletions
Generated
+1 -1
View File
@@ -824,7 +824,7 @@ dependencies = [
[[package]]
name = "realm"
version = "2.3.4"
version = "2.3.3"
dependencies = [
"cfg-if",
"chrono",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "realm"
version = "2.3.4"
version = "2.3.3"
authors = ["zhboner <zhboner@gmail.com>"]
edition = "2021"
+1 -2
View File
@@ -69,10 +69,9 @@ fn handle_matches(matches: ArgMatches) -> CmdInput {
#[cfg(all(unix, not(target_os = "android")))]
{
use realm_syscall::{get_nofile_limit, set_nofile_limit};
const THRESHOLD: u64 = 65535;
let nofile = matches.value_of("nofile").map_or_else(
|| get_nofile_limit().map_or(None, |(_, hard)| Some(if hard > THRESHOLD { THRESHOLD } else { hard })),
|| get_nofile_limit().map_or(None, |(_, hard)| Some(hard)),
|nofile| Some(nofile.parse().unwrap()),
);