Skip to content

Commit

Permalink
Revert "set fd limit when starting, up to threshold=65535"
Browse files Browse the repository at this point in the history
This reverts commit 4c4b9ca.
  • Loading branch information
zephyrchien committed May 22, 2022
1 parent 4c4b9ca commit 16795cf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "realm"
version = "2.3.4"
version = "2.3.3"
authors = ["zhboner <[email protected]>"]
edition = "2021"

Expand Down
3 changes: 1 addition & 2 deletions src/cmd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
);

Expand Down

0 comments on commit 16795cf

Please sign in to comment.