Commit 19d1761f authored by Max Lv's avatar Max Lv

Add a timeout for InetAddress.getByName() for #1846

parent ced73d5a
......@@ -399,7 +399,17 @@ object BaseService {
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()
}
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