From b2705ea702a9eaa4a0f5566ed70cdfb4f41390d3 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Thu, 15 Jul 2021 00:06:24 +0200 Subject: don't set a new ClientTransportPlugin everytime a service connection has been initiated with TorService --- .../main/java/se/leap/bitmaskclient/providersetup/ProviderAPI.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPI.java b/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPI.java index 15843697..15e77576 100644 --- a/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPI.java +++ b/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPI.java @@ -192,7 +192,9 @@ public class ProviderAPI extends JobIntentService implements ProviderApiManagerB try { if (torServiceConnection == null) { Log.d(TAG, "serviceConnection is still null"); - TorService.setClientTransportPlugin(new ClientTransportPlugin(context.getApplicationContext())); + if (!TorService.hasClientTransportPlugin()) { + TorService.setClientTransportPlugin(new ClientTransportPlugin(context.getApplicationContext())); + } torServiceConnection = new TorServiceConnection(context); } } catch (InterruptedException | IllegalStateException e) { -- cgit v1.2.3