From 78e57de833872b131408dddae81b07eaefad606e Mon Sep 17 00:00:00 2001 From: Max Lv Date: Sun, 13 Mar 2016 13:33:36 +0800 Subject: [PATCH] Refine #602 further --- .../com/github/shadowsocks/ShadowsocksNatService.scala | 4 ++-- .../com/github/shadowsocks/ShadowsocksVpnService.scala | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala b/src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala index 9a179e32..46fc72f9 100644 --- a/src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala +++ b/src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala @@ -396,7 +396,7 @@ class ShadowsocksNatService extends BaseService { } catch { case ex: Exception => changeState(State.STOPPED, getString(R.string.service_failed)) - stopRunner(false) + stopRunner(true) this.config = null } } @@ -427,7 +427,7 @@ class ShadowsocksNatService extends BaseService { notification = new ShadowsocksNotification(this, config.profileName, true) } else { changeState(State.STOPPED, getString(R.string.service_failed)) - stopRunner(false) + stopRunner(true) } } } diff --git a/src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala b/src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala index 86367e0d..96040774 100644 --- a/src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala +++ b/src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala @@ -106,7 +106,7 @@ class ShadowsocksVpnService extends VpnService with BaseService { } override def onRevoke() { - stopRunner(false) + stopRunner(true) } override def stopRunner(stopService: Boolean) { @@ -193,7 +193,7 @@ class ShadowsocksVpnService extends VpnService with BaseService { } catch { case ex: Exception => changeState(State.STOPPED, getString(R.string.service_failed)) - stopRunner(false) + stopRunner(true) this.config = null } } @@ -221,7 +221,7 @@ class ShadowsocksVpnService extends VpnService with BaseService { notification = new ShadowsocksNotification(this, config.profileName) } else { changeState(State.STOPPED, getString(R.string.service_failed)) - stopRunner(false) + stopRunner(true) } } } @@ -386,7 +386,7 @@ class ShadowsocksVpnService extends VpnService with BaseService { } if (conn == null) { - stopRunner(false) + stopRunner(true) return -1 }