summaryrefslogtreecommitdiff
path: root/crates/arti/src/reload_cfg.rs
Commit message (Collapse)AuthorAgeFilesLines
* arti: do not warn about unused variable on WindowsTobias Stoeckmann2024-02-291-0/+1
| | | | | Do not complain on non-unix systems that variable client is not used. It is only accessed within the function on unix systems.
* arti: Only exit if all the modules have been dropped.Gabriela Moldovan2024-01-251-7/+8
| | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1917#note_2988815
* arti: Use Weak references for the reconfigurable modules.Gabriela Moldovan2024-01-251-4/+12
| | | | | | | | | | | | | | | Previously, the `ProxySet` (and all the other `reconfigurable_modules`) were kept alive by the `watch_for_config_changes` background thread, which was preventing them from being dropped when `run()` exited. IOW, onion services never received the shutdown signal. Now `watch_for_config_changes` takes `Weak` references, and the only strong references to the modules are kept in the `reconfigurable_modules` local variable in `run()`, which is dropped when `run()` exits (e.g. on SIGINT). This allows onion services to execute their shutdown logic on CTRL-C. Part of #1244
* arti: Generalize a TODO HSS about reconfiguration.Nick Mathewson2023-12-121-0/+8
| | | | | | It's correct that we'd like someday for the `arti` crate APIs to allow all the different modes supported by `Reconfigure` enum; this is #1156, and it does not block an HSS release.
* arti: Make reconfiguration slightly more abstractNick Mathewson2023-12-051-23/+81
| | | | | | | | | | Now instead of having a hardwired list of of things to reconfigure, the watch_cfg module now has a vector of ReconfigurableModule. As noted in the documentation, I don't intend that this should be our final API here: It is deliberately not exposed. When we revisit the structure of `arti` more, we should probably do this differently.
* Add cognitive-complexity exceptions for clippy.Nick Mathewson2023-09-051-0/+2
| | | | I have no idea why these became necessary.
* Throughout: Use *_report!() macros for reporting Errors.Nick Mathewson2023-07-071-0/+2
| | | | | | | | | | | | | | | I identified the cases to replace by searching for the string `.report()`. There are a few that I didn't change: * A couple of cases that used anyhow::Error, * One case that reported two Errors. * Two cases in `tor_hsclient::err` that just did `error!("Bug: {}")`. I have also not audited the cases in `tor-hsclient` where we're using `tor_error::Report` manually. Nonetheless, closes #949.
* Corrected the order of imports in order to make the 'rust-checks' job ↵Andy2023-06-231-1/+1
| | | | complete successfully.
* Provided a fix for #831 - 'Unused import' warnings on WindowsAndy2023-06-231-3/+4
|
* Use tor_error::Report for remaining errors in error! in artiIan Jackson2023-01-301-1/+1
|
* Use ErrorReport/Report for errors in warn! in artiIan Jackson2023-01-301-1/+1
|
* debounce reload cfg eventstrinity-1686a2022-11-011-0/+7
|
* rename unused fieldtrinity-1686a2022-10-301-3/+2
|
* update some stringstrinity-1686a2022-10-301-10/+10
|
* use iife so we can try! instead of custom error handlingtrinity-1686a2022-10-301-64/+56
|
* refactor so events always indicate reloadtrinity-1686a2022-10-301-71/+74
|
* depends less on notify typestrinity-1686a2022-10-301-22/+35
|
* update to v5.0.0trinity-1686a2022-08-311-23/+28
|
* small refactoring to reduce duplicaiton of config reloadingtrinity-1686a2022-08-271-0/+330