Commit b4f97b88 authored by Mygod's avatar Mygod

IO error during flatten is expected

parent cdefc1d2
...@@ -85,8 +85,12 @@ class ProxyInstance(val profile: Profile, private val route: String = profile.ro ...@@ -85,8 +85,12 @@ class ProxyInstance(val profile: Profile, private val route: String = profile.ro
profile.method = proxy[3].trim() profile.method = proxy[3].trim()
} }
if (route == Acl.CUSTOM_RULES) withContext(Dispatchers.IO) { if (route == Acl.CUSTOM_RULES) try {
Acl.save(Acl.CUSTOM_RULES, Acl.customRules.flatten(10, service::openConnection)) withContext(Dispatchers.IO) {
Acl.save(Acl.CUSTOM_RULES, Acl.customRules.flatten(10, service::openConnection))
}
} catch (e: IOException) {
throw BaseService.ExpectedExceptionWrapper(e)
} }
// it's hard to resolve DNS on a specific interface so we'll do it here // it's hard to resolve DNS on a specific interface so we'll do it here
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment