Commit e0af4de2 authored by Mygod's avatar Mygod

Refine code style

parent 26326a04
...@@ -395,9 +395,7 @@ object BaseService { ...@@ -395,9 +395,7 @@ object BaseService {
// A WAR fix for Huawei devices that UnknownHostException cannot be caught correctly // A WAR fix for Huawei devices that UnknownHostException cannot be caught correctly
try { try {
profile.host = InetAddress.getByName(profile.host).hostAddress ?: "" profile.host = InetAddress.getByName(profile.host).hostAddress ?: ""
} catch (_: UnknownHostException) { } catch (_: UnknownHostException) { }
profile.host = "";
}
}.join(10 * 1000) }.join(10 * 1000)
if (!profile.host.isNumericAddress()) throw UnknownHostException() if (!profile.host.isNumericAddress()) throw UnknownHostException()
} }
......
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