Skip to content

Commit

Permalink
Increasing thread sleeps for socket listener thread and per-connectio…
Browse files Browse the repository at this point in the history
…n threads. (#2773)
  • Loading branch information
DavidBurkett authored and hashmap committed Apr 23, 2019
1 parent 97e96e4 commit 0e6a249
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion p2p/src/conn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ fn poll<H>(
let _ = thread::Builder::new()
.name("peer".to_string())
.spawn(move || {
let sleep_time = time::Duration::from_millis(1);
let sleep_time = time::Duration::from_millis(5);
let mut retry_send = Err(());
loop {
// check the read end
Expand Down
2 changes: 1 addition & 1 deletion p2p/src/serv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ impl Server {
let listener = TcpListener::bind(addr)?;
listener.set_nonblocking(true)?;

let sleep_time = Duration::from_millis(1);
let sleep_time = Duration::from_millis(5);
loop {
// Pause peer ingress connection request. Only for tests.
if self.stop_state.lock().is_paused() {
Expand Down

0 comments on commit 0e6a249

Please sign in to comment.