diff options
author | cyBerta <cyberta@riseup.net> | 2021-07-15 00:08:45 +0200 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2021-07-21 22:02:28 +0200 |
commit | a3ed9483391ef38ee6665be4e4fe25a71b4c83be (patch) | |
tree | be75e1672b9691f8ca366de73024ca27e07e6885 /app/src/main/java | |
parent | b2705ea702a9eaa4a0f5566ed70cdfb4f41390d3 (diff) |
always stop tor service connection immediately after we got the http tunnel port
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPI.java | 5 |
1 files changed, 4 insertions, 1 deletions
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 15e77576..322bf1cd 100644 --- a/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPI.java +++ b/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPI.java @@ -168,7 +168,10 @@ public class ProviderAPI extends JobIntentService implements ProviderApiManagerB getApplicationContext().startService(torServiceIntent); } - return torServiceConnection.torService.getHttpTunnelPort(); + int tunnelPort = torServiceConnection.torService.getHttpTunnelPort(); + torServiceConnection.close(); + torServiceConnection = null; + return tunnelPort; } return -1; |