refine proxy list refresing

This commit is contained in:
Max Lv
2013-10-29 11:58:23 +08:00
parent 93a269698a
commit b77a599e12
4 changed files with 21 additions and 14 deletions
@@ -227,13 +227,15 @@ class ShadowsocksService extends Service {
if (config.proxy == "198.199.101.152") {
val container = getApplication.asInstanceOf[ShadowsocksApplication].tagContainer
if (container == null) {
notifyAlert(getString(R.string.forward_fail), getString(R.string.service_failed))
stopSelf()
handler.sendEmptyMessageDelayed(MSG_CONNECT_FAIL, 500)
return
} else {
try {
config = Config.getPublicConfig(container, config)
} catch {
case ex: Exception => {
notifyAlert(getString(R.string.forward_fail), getString(R.string.service_failed))
stopSelf()
handler.sendEmptyMessageDelayed(MSG_CONNECT_FAIL, 500)
return
}
}
}