summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2022-12-14 14:48:24 +0100
committercyBerta <cyberta@riseup.net>2022-12-15 23:59:53 +0100
commitdc5338510457ace0bbd0b98b135e14be8e850ecf (patch)
tree835d7ec5ed1d7a5a82d3f6d25d8b8fe0a40f762a /app/src/main/java
parentccddf3cf10301552fffbb0654b867b9507a315d3 (diff)
null explicitely service openvpn serviceconnections after they've been closed
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/eip/EIP.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java b/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java
index b3efd21f..88cdc715 100644
--- a/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java
+++ b/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java
@@ -594,7 +594,7 @@ public final class EIP extends JobIntentService implements Observer {
}
public static class VoidVpnServiceConnection implements Closeable {
- private final Context context;
+ private Context context;
private ServiceConnection serviceConnection;
private VoidVpnService voidVpnService;
@@ -608,6 +608,9 @@ public final class EIP extends JobIntentService implements Observer {
@Override
public void close() {
context.unbindService(serviceConnection);
+ serviceConnection = null;
+ voidVpnService = null;
+ context = null;
}
private void initSynchronizedServiceConnection(final Context context) throws InterruptedException {
@@ -649,7 +652,7 @@ public final class EIP extends JobIntentService implements Observer {
*/
@WorkerThread
public static class OpenVpnServiceConnection implements Closeable {
- private final Context context;
+ private Context context;
private ServiceConnection serviceConnection;
private IOpenVPNServiceInternal service;
@@ -686,6 +689,9 @@ public final class EIP extends JobIntentService implements Observer {
@Override public void close() {
context.unbindService(serviceConnection);
+ serviceConnection = null;
+ service = null;
+ context = null;
}
public IOpenVPNServiceInternal getService() {