calling stop() makes tun2socks crash since VPN is still enabled
This commit is contained in:
parent
cae2c7c157
commit
2d5ee42894
|
@ -229,18 +229,23 @@ public class OrbotVpnService extends VpnService implements Handler.Callback {
|
||||||
{
|
{
|
||||||
Log.d(TAG,"closing interface, destroying VPN interface");
|
Log.d(TAG,"closing interface, destroying VPN interface");
|
||||||
|
|
||||||
|
//Tun2Socks.Stop();
|
||||||
|
|
||||||
if (mInterface != null)
|
if (mInterface != null)
|
||||||
{
|
{
|
||||||
mInterface.close();
|
mInterface.close();
|
||||||
mInterface = null;
|
mInterface = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Tun2Socks.Stop();
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Log.d(TAG,"error stopping tun2socks",e);
|
Log.d(TAG,"error stopping tun2socks",e);
|
||||||
}
|
}
|
||||||
|
catch (Error e)
|
||||||
|
{
|
||||||
|
Log.d(TAG,"error stopping tun2socks",e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}.start();
|
}.start();
|
||||||
super.onRevoke();
|
super.onRevoke();
|
||||||
|
|
Loading…
Reference in New Issue