4. fixed when app crashed sometimes after ygg switch off

This commit is contained in:
vadym 2020-07-03 15:04:00 -07:00
parent d169b650f9
commit 5e7ac8cb57

View File

@ -247,11 +247,11 @@ class YggdrasilTunService : VpnService() {
private fun stopVpn(pi: PendingIntent?) {
isClosed = true;
scope!!.coroutineContext.cancelChildren()
tunInputStream!!.close()
tunOutputStream!!.close()
tunInterface!!.close()
tunInterface = null
scope!!.coroutineContext.cancelChildren()
Log.d(TAG,"Stop is running from service")
ygg.stop()
val intent: Intent = Intent()