mirror of
https://github.com/rosenpass/rosenpass.git
synced 2026-02-28 06:23:08 -08:00
refactor(mio): close FDs via std instead of rustix
Signed-off-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
This commit is contained in:
@@ -3,7 +3,7 @@ use std::{
|
|||||||
collections::VecDeque,
|
collections::VecDeque,
|
||||||
io::Read,
|
io::Read,
|
||||||
marker::PhantomData,
|
marker::PhantomData,
|
||||||
os::fd::OwnedFd,
|
os::fd::{FromRawFd, OwnedFd},
|
||||||
};
|
};
|
||||||
use uds::UnixStreamExt as FdPassingExt;
|
use uds::UnixStreamExt as FdPassingExt;
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ where
|
|||||||
|
|
||||||
// Close the remaining fds
|
// Close the remaining fds
|
||||||
for fd in fd_iter {
|
for fd in fd_iter {
|
||||||
unsafe { rustix::io::close(*fd) };
|
unsafe { drop(OwnedFd::from_raw_fd(*fd)) };
|
||||||
}
|
}
|
||||||
|
|
||||||
claim_fd_result
|
claim_fd_result
|
||||||
|
|||||||
Reference in New Issue
Block a user