Skip to content

Commit

Permalink
better docs
Browse files Browse the repository at this point in the history
  • Loading branch information
divagant-martian committed Apr 24, 2024
1 parent c1238e3 commit c8fa0de
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion iroh-net/src/magicsock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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() {
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit c8fa0de

Please sign in to comment.