From c8fa0de34da01a888ce595802e08db419a5ee476 Mon Sep 17 00:00:00 2001 From: Diva M Date: Wed, 24 Apr 2024 11:58:32 -0500 Subject: [PATCH] better docs --- iroh-net/src/magicsock.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iroh-net/src/magicsock.rs b/iroh-net/src/magicsock.rs index c1c0841a43..0b7a575446 100644 --- a/iroh-net/src/magicsock.rs +++ b/iroh-net/src/magicsock.rs @@ -485,7 +485,7 @@ impl Inner { Ok(sock) } - // NOTE: Receiving on a [`Self::closed`] socket will return [`Poll::Pending`] undefinitely. + /// NOTE: Receiving on a [`Self::closed`] socket will return [`Poll::Pending`] indefinitely. #[instrument(skip_all, fields(me = %self.me))] fn poll_recv( &self, @@ -1410,6 +1410,8 @@ impl MagicSock { /// Closes the connection. /// /// Only the first close does anything. Any later closes return nil. + /// Polling the socket ([`AsyncUdpSocket::poll_recv`]) will return [`Poll::Pending`] + /// indefinitely after this call. #[instrument(skip_all, fields(me = %self.inner.me))] pub async fn close(&self) -> Result<()> { if self.inner.is_closed() { @@ -1595,6 +1597,7 @@ impl AsyncUdpSocket for MagicSock { self.inner.poll_send(cx, transmits) } + /// NOTE: Receiving on a [`Self::close`]d socket will return [`Poll::Pending`] indefinitely. fn poll_recv( &self, cx: &mut Context,