Try to increase limits on start
This commit is contained in:
parent
a60738ff89
commit
fc28e18ffd
5 changed files with 26 additions and 1 deletions
|
|
@ -24,7 +24,7 @@ use librqbit::{
|
|||
};
|
||||
use parking_lot::RwLock;
|
||||
use serde::Serialize;
|
||||
use tracing::{error, error_span};
|
||||
use tracing::{error, error_span, info, warn};
|
||||
|
||||
const ERR_NOT_CONFIGURED: ApiError =
|
||||
ApiError::new_from_text(StatusCode::FAILED_DEPENDENCY, "not configured");
|
||||
|
|
@ -307,6 +307,11 @@ async fn start() {
|
|||
})
|
||||
.unwrap();
|
||||
|
||||
match librqbit::try_increase_nofile_limit() {
|
||||
Ok(limit) => info!(limit = limit, "inreased open file limit"),
|
||||
Err(e) => warn!("failed increasing open file limit: {:#}", e),
|
||||
};
|
||||
|
||||
let state = State::new(init_logging_result).await;
|
||||
|
||||
tauri::Builder::default()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue