Skip to content

Commit

Permalink
refactor(iroh): Remove ActiveRelayMessage::GetClient (#3041)
Browse files Browse the repository at this point in the history
## Description

The headline feature is the removal of ActiveRelayMessage::GetClient.
This now means the relay client lives entirely in the ActiveRelayActor
and can start being refactored into a stream.

But there's a whole bunch more!

- ActiveRelayMessage::GetNodeRoute also no longer sends the client
  back.

- The creation of the relay::client::Client has been moved over to the
  ActiveRelayClient.  This will make it easier for this actor to be
  in charge of this and be able to re-create the connection to the
  relay.

- The creation of ActiveRelayActors is now independent of finding
  routes to nodes and staring.  Resulting in smaller functions with
  fewer concerns.

- The RelayActor now notices when an ActiveRelayActor task terminates
  and cleans up.

- close_or_reconnect_relay now always reconnects.  We already require
  relays staying connected when the ActiveRelayActor exists so this was
  a path in which this was not honoured.

- The RelayActor does some more concurrent futures work when sending
  messages to several ActiveRelayActors at once.

## 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 16, 2024
1 parent 58df1d8 commit 1ba140f
Showing 1 changed file with 196 additions and 199 deletions.
Loading

0 comments on commit 1ba140f

Please sign in to comment.