From d169b650f9804f25a5aaad37a46718f21482d7e3 Mon Sep 17 00:00:00 2001 From: vadym Date: Fri, 3 Jul 2020 14:42:35 -0700 Subject: [PATCH] 2. ping selected Peers and DNS fixes --- .../java/io/github/chronosx88/yggdrasil/DNSListActivity.kt | 3 --- .../java/io/github/chronosx88/yggdrasil/PeerListActivity.kt | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/io/github/chronosx88/yggdrasil/DNSListActivity.kt b/app/src/main/java/io/github/chronosx88/yggdrasil/DNSListActivity.kt index 0520e86..3f13284 100644 --- a/app/src/main/java/io/github/chronosx88/yggdrasil/DNSListActivity.kt +++ b/app/src/main/java/io/github/chronosx88/yggdrasil/DNSListActivity.kt @@ -63,9 +63,6 @@ class DNSListActivity : AppCompatActivity() { d.ping = ping } for (dns in allDNS) { - if (cd.contains(dns)) { - continue - } var ping = ping(dns.address, 53) dns.ping = ping runOnUiThread( diff --git a/app/src/main/java/io/github/chronosx88/yggdrasil/PeerListActivity.kt b/app/src/main/java/io/github/chronosx88/yggdrasil/PeerListActivity.kt index 04e06fa..c359c49 100644 --- a/app/src/main/java/io/github/chronosx88/yggdrasil/PeerListActivity.kt +++ b/app/src/main/java/io/github/chronosx88/yggdrasil/PeerListActivity.kt @@ -96,11 +96,11 @@ class PeerListActivity : AppCompatActivity() { var address = InetAddress.getByName(url.host) var peerInfo = PeerInfo(url.scheme, address, url.port, ccp.nameCode) + var ping = ping(address, url.port) + peerInfo.ping = ping if(cp.contains(peerInfo)){ continue } - var ping = ping(address, url.port) - peerInfo.ping = ping withContext(Dispatchers.Main) { adapter.addItem(peerInfo) if(adapter.count % 5 == 0) {