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?) { private fun stopVpn(pi: PendingIntent?) {
isClosed = true; isClosed = true;
scope!!.coroutineContext.cancelChildren()
tunInputStream!!.close() tunInputStream!!.close()
tunOutputStream!!.close() tunOutputStream!!.close()
tunInterface!!.close() tunInterface!!.close()
tunInterface = null tunInterface = null
scope!!.coroutineContext.cancelChildren()
Log.d(TAG,"Stop is running from service") Log.d(TAG,"Stop is running from service")
ygg.stop() ygg.stop()
val intent: Intent = Intent() val intent: Intent = Intent()