From dc6b69751d0f6a4d367268aad4974c35d639c5e3 Mon Sep 17 00:00:00 2001 From: Tim Zhang Date: Tue, 24 Sep 2024 18:07:05 +0800 Subject: [PATCH] Update timeout to infinite for poll of accept It should be a mistake to modify it from -1 to 10 in the PR #226 https://github.com/containerd/ttrpc-rust/pull/226/files#diff-e74ddb472174f24fb4713f5a2fe2d33bbc5db28ee2a5c7dad1ea9025b897e8a5R110 There already are monitor_fd to notify exit, so accept without timeout is safe. Signed-off-by: Tim Zhang --- src/sync/sys/unix/net.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sync/sys/unix/net.rs b/src/sync/sys/unix/net.rs index bf109bad..3deadf41 100644 --- a/src/sync/sys/unix/net.rs +++ b/src/sync/sys/unix/net.rs @@ -101,7 +101,7 @@ impl PipeListener { libc::poll( pollers as *mut _ as *mut libc::pollfd, pollers.len() as _, - POLL_MAX_TIME, + -1, ) };