Skip to content

Commit

Permalink
ref(iroh): Remove unused function (#2984)
Browse files Browse the repository at this point in the history
## Description

It seems this function is entirely unused?  Why did the compiler not
pick this up?  ??

## Breaking Changes

<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->

## Change checklist

- [x] Self-review.
- [x] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [x] Tests if relevant.
- [x] All breaking changes documented.
  • Loading branch information
flub authored Dec 2, 2024
1 parent b2cb0ca commit 4ffbd13
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions iroh/src/magicsock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1172,34 +1172,6 @@ impl MagicSock {
Ok(())
}

fn poll_send_relay(
&self,
url: &RelayUrl,
node: PublicKey,
contents: RelayContents,
) -> Poll<bool> {
trace!(node = %node.fmt_short(), relay_url = %url, count = contents.len(), len = contents.iter().map(|c| c.len()).sum::<usize>(), "send relay");
let msg = RelayActorMessage::Send {
url: url.clone(),
contents,
remote_node: node,
};
match self.relay_actor_sender.try_send(msg) {
Ok(_) => {
trace!(node = %node.fmt_short(), relay_url = %url, "send relay: message queued");
Poll::Ready(true)
}
Err(mpsc::error::TrySendError::Closed(_)) => {
warn!(node = %node.fmt_short(), relay_url = %url, "send relay: message dropped, channel to actor is closed");
Poll::Ready(false)
}
Err(mpsc::error::TrySendError::Full(_)) => {
warn!(node = %node.fmt_short(), relay_url = %url, "send relay: message dropped, channel to actor is full");
Poll::Pending
}
}
}

fn send_queued_call_me_maybes(&self) {
let msg = self.direct_addrs.to_call_me_maybe_message();
let msg = disco::Message::CallMeMaybe(msg);
Expand Down

0 comments on commit 4ffbd13

Please sign in to comment.