Try to increase limits on start

This commit is contained in:
Igor Katson 2023-12-17 13:01:59 +00:00
parent a60738ff89
commit fc28e18ffd
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
5 changed files with 26 additions and 1 deletions

View file

@ -59,3 +59,7 @@ pub use librqbit_core::torrent_metainfo::*;
pub fn version() -> &'static str {
env!("CARGO_PKG_VERSION")
}
pub fn try_increase_nofile_limit() -> anyhow::Result<u64> {
Ok(rlimit::increase_nofile_limit(1024 * 1024)?)
}