summaryrefslogtreecommitdiff
path: root/crates/tor-circmgr/src/err.rs
Commit message (Collapse)AuthorAgeFilesLines
* Fold EK::Canceled into TransientFailureNick Mathewson2022-02-221-1/+7
| | | | Also add some TODO comments in circmgr for future work.
* Handle panics from circuit construction.Nick Mathewson2022-02-181-2/+1
| | | | | | | | | | | | We handle them by reporting them to task that's waiting for the circuit, then relaying the panic. Doing so allows the waiting task to distinguish panics (EK::Internal) from cases where the reactor dropped the task entirely (EK::ReactorShuttingDown). And doing _that_ removes one case of EK::Canceled, which helps us on our goals towards #348. Closes #347.
* Rename CircuitTimeout to TorNetworkTimeout.Nick Mathewson2022-02-171-2/+2
|
* tor_circmgr::Error: Sort variants by interesting-ness.Nick Mathewson2022-02-171-37/+37
| | | | We can't use discriminants here now, but maybe we can in the future.
* Clarify and rename PendingCanceledNick Mathewson2022-02-161-6/+7
| | | | | | | | From its old name, this error had implied that we were giving no useful information when we were waiting on a pending cirucit request that failed. In fact, this error would only happen if we dropped the `mpsc::Sender` for a circuit attempt without reporting success or failure.
* Provide a better ErrorKind from RetryError.Nick Mathewson2022-02-161-3/+26
| | | | (Instead of reporting the _last_ error, report the _worst_ error.)
* circmgr: Add a Kind for speculative guard failure.Nick Mathewson2022-02-161-1/+1
| | | | | | | | | | These errors should almost never be seen by the user; we should instead retry the circuit. But they _can_ be seen by the use if selecting a guard takes too long, or too many attempts. (Therefore, they aren't true "internal" errors.) I suspect that we might not want to keep this TransientFailure kind, but I'm not sure what else to do here for now.
* Add kinds for *most* circmgr errors.Nick Mathewson2022-02-161-15/+29
| | | | There are a couple of tricky ones I'll do separately.
* circmgr: Port InternalError to use Bug.Nick Mathewson2022-02-161-4/+5
|
* Make SpawnError wrappers contain a 'spawning' stringNick Mathewson2022-02-041-8/+18
| | | | | (By our convention, these errors should say what we were trying to spawn when the error occurred.)
* errors: Drop "Error" and "Failed" from various enum variantsIan Jackson2022-02-041-2/+2
|
* tor-circmgr::Error: impl HasKindIan Jackson2022-02-041-0/+12
|
* tor-circmgr: Handle channel creation errors in the new styleIan Jackson2022-02-041-3/+12
|
* spawn errors: Fix arti-client, tor-chanmgr, tor-circmgrIan Jackson2022-02-041-3/+10
| | | | | | | Provide an enum variant to contain the SpawnError and a From impl. We use `#[from]` here because it doesn't really make sense to attach any context, as it's not likely to be very relevant.
* Merge branch 'reconfigure' into 'main'eta2021-12-131-0/+8
|\ | | | | | | | | Make most arti-client fields reconfigurable. See merge request tpo/core/arti!181
| * Fix Rustdoc errors.Nick Mathewson2021-12-081-3/+3
| |
| * Allow on-the-fly changing of path_rulesNick Mathewson2021-12-071-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | And now the complexity begins: when the user changes the path_rules, they not only want new circuits to obey those rules: they want _all new requests_ to be put onto circuits that obey those rules. That means that when the path rules become more restrictive, we need to retire all the circuits, and make sure that currently pending circuits aren't used for any requests. If it's any comfort, doing this was even more complicated in C tor. ;)
* | Don't create circuits if the consensus is stale by over 72 hoursNeel Chauhan2021-12-121-0/+4
|/
* Implement the guard side of shared state directories.Nick Mathewson2021-10-211-1/+10
|
* Actually select guards for directory circuits.Nick Mathewson2021-10-131-0/+4
|
* Integrate GuardUsability and GuardMonitor into CircuitBuilder.Nick Mathewson2021-10-101-0/+5
| | | | | | (When we're building a path with a guard, we need to tell the guard manager whether the path succeeded, and we need to wait to hear whether the guard is usable.)
* Add a GuardMgr member to CircuitBuilderNick Mathewson2021-10-101-0/+4
|
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-271-0/+73
This will cause some pain for now, but now is really the best time to do this kind of thing.