Closed quanweiZhou closed 1 month ago
The current process will exit the loop if Accept fails once, causing all subsequent links to fail to accept. https://github.com/containerd/ttrpc-rust/blob/v0.5.7/src/sync/server.rs#L426
let handler = thread::Builder::new() .name("listener_loop".into()) .spawn(move || { ... loop { ... #[cfg(target_os = "linux")] let fd = match accept4(listener, SockFlag::SOCK_CLOEXEC) { Ok(fd) => fd, Err(e) => { error!("failed to accept error {:?}", e); break; } }; ... }) .unwrap();
If the Accept error occurs, an error can be output to ensure that the subsequent connect can be accepted normally.
If the Accept error is detected, the loop will be exited, causing subsequent requests to fail to be accepted.
Description of problem
The current process will exit the loop if Accept fails once, causing all subsequent links to fail to accept. https://github.com/containerd/ttrpc-rust/blob/v0.5.7/src/sync/server.rs#L426
Expected result
If the Accept error occurs, an error can be output to ensure that the subsequent connect can be accepted normally.
Actual result
If the Accept error is detected, the loop will be exited, causing subsequent requests to fail to be accepted.