Fix #658
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user