arti: Use Weak references for the reconfigurable modules.
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 (closed)