Fix NAT mode not working after task removed from recent

This commit is contained in:
Mygod
2015-12-26 23:27:21 +08:00
parent 51ceb3dac5
commit 0018a7ca9e
4 changed files with 10 additions and 17 deletions
@@ -113,8 +113,6 @@ class ShadowsocksVpnService extends VpnService with BaseService {
override def stopRunner() {
super.stopRunner()
if (vpnThread != null) {
vpnThread.stopThread()
vpnThread = null
@@ -136,17 +134,13 @@ class ShadowsocksVpnService extends VpnService with BaseService {
conn = null
}
// stop the service if nothing has bound to it
stopSelf()
// clean up recevier
if (closeReceiver != null) {
unregisterReceiver(closeReceiver)
closeReceiver = null
}
// channge the state
changeState(State.STOPPED)
super.stopRunner()
}
def getVersionName: String = {