Skip to content

Commit

Permalink
Merge pull request #598 from bytedance/fix-sock-delete
Browse files Browse the repository at this point in the history
fix socke delete
  • Loading branch information
yoloyyh authored Apr 9, 2024
2 parents 830b94d + 62e4e23 commit 6084d4d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
3 changes: 2 additions & 1 deletion rasp/plugin/src/monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,8 @@ fn internal_main(
.spawn(move || loop {
debug!("inspect thread looping");
if !inspect_ctrl.check() {
warn!("inspect thread recv stop signal, quiting")
warn!("inspect thread recv stop signal, quiting");
break;
}
let pid = match pid_receiver.try_recv() {
Ok(p) => p,
Expand Down
12 changes: 10 additions & 2 deletions rasp/rasp_server/src/comm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,16 @@ pub async fn start_bind(sock: RASPSock) -> Result<(), String> {
sleep(Duration::from_secs(60 * 60)).await;
} else {
error!("RASP ERROR: SOCK has been deleted");
let _ = checking_ctrl.stop();
break;

match clean_bind_addr(&sock.server_addr.clone()) {
Ok(()) => {
info!("bind: {}", &sock.server_addr.clone());
},
Err(err) => {
error!("clean bind path err: {:?}", err);
},
}
listen(&sock.server_addr.clone());
}
}
});
Expand Down

0 comments on commit 6084d4d

Please sign in to comment.