Просмотр исходного кода

Merge branch 'master' of https://github.com/Psiphon-Labs/psiphon-tunnel-core

Rod Hynes 9 лет назад
Родитель
Сommit
f409b9b9de
1 измененных файлов с 6 добавлено и 4 удалено
  1. 6 4
      MobileLibrary/Android/PsiphonTunnel/PsiphonTunnel.java

+ 6 - 4
MobileLibrary/Android/PsiphonTunnel/PsiphonTunnel.java

@@ -498,10 +498,12 @@ public class PsiphonTunnel extends Psi.PsiphonProvider.Stub {
                 JSONObject data = notice.getJSONObject("data");
                 mHostService.onClientVerificationRequired(data.getString("nonce"), data.getInt("ttlSeconds"), data.getBoolean("resetCache"));
             } else if (noticeType.equals("ActiveTunnel")) {
-                if (notice.getJSONObject("data").getBoolean("isTCS")) {
-                  disableUdpGwKeepalive();
-                } else {
-                  enableUdpGwKeepalive();
+                if (isVpnMode()) {
+                    if (notice.getJSONObject("data").getBoolean("isTCS")) {
+                      disableUdpGwKeepalive();
+                    } else {
+                      enableUdpGwKeepalive();
+                    }
                 }
             }