Skip to content

Commit

Permalink
refactor(iroh): ActiveRelayActor terminates itself (#3061)
Browse files Browse the repository at this point in the history
## Description

This moves the logic of terminating an ActiveRelayActor from the
RelayActor to the ActiveRelayActor itself.  This is nice for two
reasons:

- The interactions between ActiveRelayActor and RelayActor are even
  simpler.  RelayActor logic is now easy to reason about.

- It will allow ActiveRelayActor to manage reconnections with
  exponential backoff better.  Currently this behaviour is not changed
  but the RelayActor getting involved meant the backoff behaviour was
  influcenced in two places.

Now that the ActiveRelayActor lifecyle is much more straight forward
the RelayActor's terminating is tidied up as well.

## 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.

---------

Co-authored-by: Friedel Ziegelmayer <me@dignifiedquire.com>
  • Loading branch information
flub and dignifiedquire authored Dec 19, 2024
1 parent 834ab78 commit 693922a
Showing 1 changed file with 134 additions and 118 deletions.
Loading

0 comments on commit 693922a

Please sign in to comment.