Skip to content

Commit

Permalink
Move sysinfo fix from staging (#2085)
Browse files Browse the repository at this point in the history
* Move sysinfo fix from staging
  • Loading branch information
ailisp authored Feb 4, 2020
1 parent 4bc4b74 commit 15753f4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions 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 chain/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ rand = "0.7"
serde = { version = "1.0", features = ["derive"] }
serde_derive = "1.0"
serde_json = "1.0"
sysinfo = "0.10"
sysinfo = "0.10.5"
cached = "0.11.0"
lazy_static = "1.4"
borsh = "0.2.10"
Expand Down
3 changes: 2 additions & 1 deletion chain/client/src/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use actix::Addr;
use ansi_term::Color::{Blue, Cyan, Green, White, Yellow};
use log::info;
use serde_json::json;
use sysinfo::{get_current_pid, Pid, ProcessExt, System, SystemExt};
use sysinfo::{get_current_pid, set_open_files_limit, Pid, ProcessExt, System, SystemExt};

use near_chain::Tip;
use near_network::types::{NetworkInfo, PeerId};
Expand Down Expand Up @@ -40,6 +40,7 @@ impl InfoHelper {
telemetry_actor: Addr<TelemetryActor>,
block_producer: Option<BlockProducer>,
) -> Self {
set_open_files_limit(0);
InfoHelper {
started: Instant::now(),
num_blocks_processed: 0,
Expand Down

0 comments on commit 15753f4

Please sign in to comment.