Perhaps strange OnionService::launch(...) returns an Arc<RunningOnionService>
The function specification mentions the onion service is terminated once the RunningOnionService
is dropped. I had to go diving into the source to see if something else holds a reference to the Arc<>
, given that I want to control when an OnionService
is terminated via dropping. If I'm understanding things right, in OnionService::launch()
an Arc is created and immediately returned.
Why not let the caller handle putting the RunningOnionService
object in an Arc<>
if required?