This commit is contained in:
Max Lv
2016-04-25 20:24:55 +08:00
parent 1ddde094e3
commit 5328f5851d
5 changed files with 11 additions and 4 deletions
@@ -418,11 +418,12 @@ class ShadowsocksNatService extends BaseService {
resolved = true
}
if (resolved && handleConnection) {
if (!resolved) {
changeState(State.STOPPED, getString(R.string.invalid_server))
stopRunner(true)
} else if (handleConnection) {
// Set DNS
flushDns()
changeState(State.CONNECTED)
notification = new ShadowsocksNotification(this, config.profileName, true)
} else {
@@ -216,7 +216,10 @@ class ShadowsocksVpnService extends VpnService with BaseService {
resolved = true
}
if (resolved && handleConnection) {
if (!resolved) {
changeState(State.STOPPED, getString(R.string.invalid_server))
stopRunner(true)
} else if (handleConnection) {
changeState(State.CONNECTED)
notification = new ShadowsocksNotification(this, config.profileName)
} else {