Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hard fileno #366

Merged
merged 5 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ hickory-resolver = { version = "0.24.1", features = ["tokio", "dns-over-https-ru
ppp = { version = "2.2.0", features = [] }
async-channel = { version = "2.3.1", features = [] }

fdlimit = "0.3.0"

# For config file parsing
regex = { version = "1.11.0", default-features = false, features = ["std", "perf"] }
serde_regex = "1.1.0"
Expand Down
5 changes: 4 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use base64::Engine;
use clap::Parser;
use hyper::header::HOST;
use hyper::http::{HeaderName, HeaderValue};
use log::debug;
use log::{debug, warn};
use parking_lot::{Mutex, RwLock};
use std::collections::BTreeMap;
use std::fmt::Debug;
Expand Down Expand Up @@ -727,6 +727,9 @@ async fn main() -> anyhow::Result<()> {
} else {
logger.init();
};
if let Err(err) = fdlimit::raise_fd_limit() {
warn!("Failed to set soft filelimit to hard file limit: {}", err)
}

match args.commands {
Commands::Client(args) => {
Expand Down
Loading