summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2022-06-03 18:41:59 +0200
committercyBerta <cyberta@riseup.net>2022-07-19 00:03:56 +0200
commit0fef9e2e19ccc77456a66f4f174b1fea94c1260f (patch)
treeff095dff4cacf911ca05e5ae70bb5ca9748b7052 /app/src/main
parent685da9ad4a80cd42cbe4c6fcd8383bcdd843ec6d (diff)
ensure socks proxy has started before openvpn tries to use it
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/pluggableTransports/ObfsVpnClient.java20
1 files changed, 9 insertions, 11 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/pluggableTransports/ObfsVpnClient.java b/app/src/main/java/se/leap/bitmaskclient/pluggableTransports/ObfsVpnClient.java
index c871c708..69210881 100644
--- a/app/src/main/java/se/leap/bitmaskclient/pluggableTransports/ObfsVpnClient.java
+++ b/app/src/main/java/se/leap/bitmaskclient/pluggableTransports/ObfsVpnClient.java
@@ -27,18 +27,16 @@ public class ObfsVpnClient implements Observer {
}
public void start() {
- new Thread(() -> {
- synchronized (LOCK) {
- Log.d(TAG, "aquired LOCK");
- new Thread(obfsVpnClient::start).start();
- try {
- Thread.sleep(500);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- Log.d(TAG, "returning LOCK after 500 ms");
+ synchronized (LOCK) {
+ Log.d(TAG, "aquired LOCK");
+ new Thread(obfsVpnClient::start).start();
+ try {
+ Thread.sleep(500);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
}
- }).start();
+ Log.d(TAG, "returning LOCK after 500 ms");
+ }
}
public void stop() {