diff options
author | bdonlan <bdonlan@gmail.com> | 2020-11-07 01:12:06 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-07 10:12:06 +0100 |
commit | a43ec09b55363374221aa3214fe0cec3d6712b6c (patch) | |
tree | f0b3d3c388580dc79fe35e72c460aa7cea2c8aac /tokio/tests | |
parent | 90c2a510e28a05cc72f76eb5e8bd4a7f7751e333 (diff) |
async_fd: make into_inner() deregister the fd (#3104)
* async_fd: make into_inner() deregister the fd
Fixes: #3103
* make clippy happy
Co-authored-by: Bryan Donlan <bdonlan@amazon.com>
Diffstat (limited to 'tokio/tests')
-rw-r--r-- | tokio/tests/io_async_fd.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tokio/tests/io_async_fd.rs b/tokio/tests/io_async_fd.rs index 0303eff6..f3b89b35 100644 --- a/tokio/tests/io_async_fd.rs +++ b/tokio/tests/io_async_fd.rs @@ -304,6 +304,15 @@ async fn drop_closes() { } #[tokio::test] +async fn reregister() { + let (a, _b) = socketpair(); + + let afd_a = AsyncFd::new(a).unwrap(); + let a = afd_a.into_inner(); + AsyncFd::new(a).unwrap(); +} + +#[tokio::test] async fn with_poll() { use std::task::Poll; |