Commit b3b90a91 authored by Mygod's avatar Mygod

Refine #1846

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