+252
−23
Loading
TB 43186: TorConnect handles TorProvider initialisation errors. + Add the `"ProviderStopped"` stage, which we enter whenever the current `TorProvider` needs replacing. + In the `init` method we check `TorProvider.settledState` to see if the current provider is still running at startup. After this, we listen for the `ProviderStateChanged` event to see if it stops running later on. + We expose a `restartProvider` method to request a new provider. The `ProviderStatusChange` event allow consumers to update the UI.