commit 2d5ee42894fc83659faaf5fb57b7ffd4c47ebe5c Author: Nathan Freitas nathan@freitas.net Date: Thu Mar 19 10:28:49 2015 -0400
calling stop() makes tun2socks crash since VPN is still enabled --- src/org/torproject/android/vpn/OrbotVpnService.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/org/torproject/android/vpn/OrbotVpnService.java b/src/org/torproject/android/vpn/OrbotVpnService.java index 46c6efc..93a4d0a 100644 --- a/src/org/torproject/android/vpn/OrbotVpnService.java +++ b/src/org/torproject/android/vpn/OrbotVpnService.java @@ -229,18 +229,23 @@ public class OrbotVpnService extends VpnService implements Handler.Callback { { Log.d(TAG,"closing interface, destroying VPN interface");
+ //Tun2Socks.Stop(); + if (mInterface != null) { mInterface.close(); mInterface = null; } - Tun2Socks.Stop(); } catch (Exception e) { Log.d(TAG,"error stopping tun2socks",e); } + catch (Error e) + { + Log.d(TAG,"error stopping tun2socks",e); + } } }.start(); super.onRevoke();