From 19b31bcdf0add0fb4854a0d7060445d459df30cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Wed, 9 Oct 2024 19:00:46 +0200 Subject: [PATCH] refactor(mio): close FDs via std instead of rustix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Kröning --- util/src/mio/uds_recv_fd.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/src/mio/uds_recv_fd.rs b/util/src/mio/uds_recv_fd.rs index 8e83b83..a6aef2a 100644 --- a/util/src/mio/uds_recv_fd.rs +++ b/util/src/mio/uds_recv_fd.rs @@ -3,7 +3,7 @@ use std::{ collections::VecDeque, io::Read, marker::PhantomData, - os::fd::OwnedFd, + os::fd::{FromRawFd, OwnedFd}, }; use uds::UnixStreamExt as FdPassingExt; @@ -115,7 +115,7 @@ where // Close the remaining fds for fd in fd_iter { - unsafe { rustix::io::close(*fd) }; + unsafe { drop(OwnedFd::from_raw_fd(*fd)) }; } claim_fd_result