Commit b3b90a91 authored by Mygod's avatar Mygod

Refine #1846

parent ae3c9d76
...@@ -398,17 +398,11 @@ object BaseService { ...@@ -398,17 +398,11 @@ object BaseService {
// Clean up // Clean up
killProcesses() killProcesses()
if (!profile.host.isNumericAddress()) if (!profile.host.isNumericAddress()) {
{ thread("BaseService-resolve") {
val resolveThread = thread() { profile.host = InetAddress.getByName(profile.host).hostAddress ?: ""
profile.host = InetAddress.getByName(profile.host).hostAddress ?: throw UnknownHostException() }.join(10 * 1000)
} if (!profile.host.isNumericAddress()) throw UnknownHostException()
resolveThread.join(10 * 1000)
}
if (!profile.host.isNumericAddress())
{
throw UnknownHostException()
} }
startNativeProcesses() startNativeProcesses()
......
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