diff --git a/rasp/librasp/src/lib.rs b/rasp/librasp/src/lib.rs index 3f8f07967..41a62a9c5 100644 --- a/rasp/librasp/src/lib.rs +++ b/rasp/librasp/src/lib.rs @@ -52,7 +52,7 @@ pub mod async_command { return Ok(status); } Ok(None) => { - sleep(Duration::from_secs(5)); + sleep(Duration::from_secs(1)); } Err(e) => { warn!("attempting wait failed: {}", e); @@ -77,7 +77,7 @@ pub mod async_command { kill_child(pid as i32); return; } - sleep(Duration::from_secs(5)); + sleep(Duration::from_secs(1)); }) .unwrap(); diff --git a/rasp/rasp_server/src/comm.rs b/rasp/rasp_server/src/comm.rs index 54afb62d3..3022b4695 100644 --- a/rasp/rasp_server/src/comm.rs +++ b/rasp/rasp_server/src/comm.rs @@ -119,6 +119,7 @@ pub async fn start_bind(sock: RASPSock) -> Result<(), String> { (*pw).remove(&pid); } } + drop(pw); sleep(Duration::from_secs(30)).await; } }); @@ -138,7 +139,7 @@ pub async fn start_bind(sock: RASPSock) -> Result<(), String> { break; } Err(TryRecvError::Empty) => { - sleep(Duration::from_secs(30)).await; + sleep(Duration::from_secs(3)).await; continue; } };