2. ping selected Peers and DNS fixes

This commit is contained in:
vadym 2020-07-03 14:42:35 -07:00
parent d403c0c15d
commit d169b650f9
2 changed files with 2 additions and 5 deletions

View File

@ -63,9 +63,6 @@ class DNSListActivity : AppCompatActivity() {
d.ping = ping d.ping = ping
} }
for (dns in allDNS) { for (dns in allDNS) {
if (cd.contains(dns)) {
continue
}
var ping = ping(dns.address, 53) var ping = ping(dns.address, 53)
dns.ping = ping dns.ping = ping
runOnUiThread( runOnUiThread(

View File

@ -96,11 +96,11 @@ class PeerListActivity : AppCompatActivity() {
var address = InetAddress.getByName(url.host) var address = InetAddress.getByName(url.host)
var peerInfo = var peerInfo =
PeerInfo(url.scheme, address, url.port, ccp.nameCode) PeerInfo(url.scheme, address, url.port, ccp.nameCode)
var ping = ping(address, url.port)
peerInfo.ping = ping
if(cp.contains(peerInfo)){ if(cp.contains(peerInfo)){
continue continue
} }
var ping = ping(address, url.port)
peerInfo.ping = ping
withContext(Dispatchers.Main) { withContext(Dispatchers.Main) {
adapter.addItem(peerInfo) adapter.addItem(peerInfo)
if(adapter.count % 5 == 0) { if(adapter.count % 5 == 0) {