mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-16 17:27:39 +00:00
stop tor in disable fn
This commit is contained in:
parent
765e2b9b2e
commit
a12b6955a9
1 changed files with 4 additions and 2 deletions
|
@ -100,17 +100,19 @@ class TorService {
|
|||
}
|
||||
}
|
||||
|
||||
/// disable tor
|
||||
/// Disable Tor.
|
||||
Future<void> disable() async {
|
||||
if (_tor == null) {
|
||||
throw Exception("TorService.init has not been called!");
|
||||
}
|
||||
|
||||
// no need to update status and fire event if status won't change
|
||||
// No need to update status and fire event if status won't change.
|
||||
if (_status == TorConnectionStatus.disconnected) {
|
||||
return;
|
||||
}
|
||||
|
||||
await _tor?.stop();
|
||||
|
||||
_updateStatusAndFireEvent(
|
||||
status: TorConnectionStatus.disconnected,
|
||||
message: "TorService.disable call success",
|
||||
|
|
Loading…
Reference in a new issue