From cf14278b92b0a91d01587f09b4b00ea655ae24e6 Mon Sep 17 00:00:00 2001 From: En-En <39373446+En-En-Code@users.noreply.github.com> Date: Sun, 25 Jan 2026 13:11:53 +0000 Subject: [PATCH] fix: correct `listenfd` assertion Forgot I wanted the expression for checking identical file descriptors to be false. --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index eb73f57..f66a080 100644 --- a/src/main.rs +++ b/src/main.rs @@ -218,7 +218,7 @@ fn parse_args() -> RealData { // - parse_args() must only be called once to avoid double closing. // - no fd can be provided multiple times to avoid double closing. assert!( - data.listenfds.iter().any(|l| l.as_raw_fd() == fd), + !data.listenfds.iter().any(|l| l.as_raw_fd() == fd), "Multiple -listenfd with the same fd is not allowed" ); let fd = unsafe { OwnedFd::from_raw_fd(fd) };