diff --git a/app/lib/features/tor/utils/tor_entrypoint.dart b/app/lib/features/tor/utils/tor_entrypoint.dart index b9b019f2..95eb1499 100644 --- a/app/lib/features/tor/utils/tor_entrypoint.dart +++ b/app/lib/features/tor/utils/tor_entrypoint.dart @@ -29,7 +29,7 @@ Future onStart(ServiceInstance service) async { Timer? timeout; final startedProxyType = {}; - await Tor.init(); + Tor.init(); final portSub = Tor.instance.events.stream.listen((port) { service.invoke('portUpdate', {'port': port}); diff --git a/packages/tor/example/lib/main.dart b/packages/tor/example/lib/main.dart index 1306f344..d6a33f05 100644 --- a/packages/tor/example/lib/main.dart +++ b/packages/tor/example/lib/main.dart @@ -73,7 +73,7 @@ class _MyAppState extends State { ); Future startTor() async { - await Tor.init(); + Tor.init(); // Start the proxy await Tor.instance.start(); diff --git a/packages/tor/lib/tor.dart b/packages/tor/lib/tor.dart index 06cf1e09..67f2474d 100644 --- a/packages/tor/lib/tor.dart +++ b/packages/tor/lib/tor.dart @@ -99,7 +99,7 @@ class Tor { /// Returns a Future that completes when the Tor service has started. /// /// Throws an exception if the Tor service fails to start. - static Future init({bool enabled = true}) async { + static Tor init({bool enabled = true}) { final singleton = Tor._instance; singleton._enabled = enabled; return singleton;