mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-02-02 03:06:35 +00:00
hopefully fix performance issues
This commit is contained in:
parent
d6faada2a3
commit
f37125efbe
1 changed files with 4 additions and 4 deletions
|
@ -29,7 +29,7 @@ abstract class TorViewModelBase with Store {
|
|||
|
||||
bool torStarted = false;
|
||||
final SettingsStore _settingsStore;
|
||||
final Tor tor = Tor.instance;
|
||||
Tor tor = Tor.instance;
|
||||
|
||||
@action
|
||||
Future<void> updateStartOnLaunch(bool value) async {
|
||||
|
@ -72,7 +72,7 @@ abstract class TorViewModelBase with Store {
|
|||
|
||||
if (!torStarted) {
|
||||
torStarted = true;
|
||||
await Tor.init();
|
||||
tor = await Tor.init();
|
||||
await Tor.instance.enable();
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ abstract class TorViewModelBase with Store {
|
|||
SocksTCPClient.setProxy(proxies: [
|
||||
ProxySettings(
|
||||
InternetAddress.loopbackIPv4,
|
||||
Tor.instance.port,
|
||||
tor.port,
|
||||
password: null,
|
||||
),
|
||||
]);
|
||||
|
@ -101,7 +101,7 @@ abstract class TorViewModelBase with Store {
|
|||
// setting the torConnectionMode to disabled will prevent anything from actually using the proxy
|
||||
_settingsStore.shouldStartTorOnLaunch = false;
|
||||
torConnectionStatus = TorConnectionStatus.disconnected;
|
||||
await connectOrDisconnectNodeToProxy(connect: false);
|
||||
SocksTCPClient.removeProxy();
|
||||
await connectOrDisconnectNodeToProxy(connect: false);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue