-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(iroh-net)!: Make netcheck::Client !Clone (#2716)
## Description netcheck::Client owns the actor task and when dropped it will abort the actor task. Making a struct owning a task Clone means it is easy to lose track of who should be owning a task like this. I now believe each task should have a clear supervisor/owner in charge of it. This cleans up the multiple-ownership of the netcheck::Client, which is just a small step into this direction. Later on, for e.g. #2647, more supervision will be added. But small changes are good. ## Breaking Changes - `iroh_net::netcheck::Client::receive_stun_packet` is no longer available. - `iroh_net::netcheck::Client` is not longer `Clone`. ## Notes & open questions I don't want to make `Addr` public, in fact I'd like all of netcheck to be private. So I made some docs not links to avoid the warnings resulting to linking to private items from public docs. Removing `Client::receive_stun_packet` is a bit harsh. I'd like to make all of netcheck private, but the cli uses it for the doctor so I'm a bit stuck. In any case, the way that uses it does not need `receive_stun_packet`. ## 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. - ~~[ ] Tests if relevant.~~ - ~~[ ] All breaking changes documented.~~
- Loading branch information
Showing
3 changed files
with
37 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters