Commit 3e5ef4c1 authored by Mygod's avatar Mygod

Handle race conditions in testConnection

parent 17f16de3
......@@ -81,7 +81,7 @@ class HttpsTest : ViewModel() {
fun testConnection() {
cancelTest()
status.value = Status.Testing
val url = URL("https", when (Core.currentProfile!!.first.route) {
val url = URL("https", when ((Core.currentProfile ?: return).first.route) {
Acl.CHINALIST -> "www.qualcomm.cn"
else -> "www.google.com"
}, "/generate_204")
......
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