Commit 9894d0e9 authored by Mygod's avatar Mygod

Fix proxies timeout not thrown

parent f4e65b2e
......@@ -60,14 +60,14 @@ class ProxyInstance(val profile: Profile, private val route: String = profile.ro
conn.doOutput = true
val proxies = try {
withTimeout(30_000) {
withTimeoutOrNull(30_000) {
withContext(Dispatchers.IO) {
conn.outputStream.bufferedWriter().use {
it.write("sig=" + Base64.encodeToString(mdg.digest(), Base64.DEFAULT))
}
conn.inputStream.bufferedReader().readText()
}
}
} ?: throw UnknownHostException()
} finally {
conn.disconnectFromMain()
}.split('|').toMutableList()
......
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