mirror of
https://github.com/yggdrasil-network/crispa-android.git
synced 2025-01-22 07:56:30 +00:00
2. ping selected Peers and DNS fixes
This commit is contained in:
parent
d403c0c15d
commit
d169b650f9
@ -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(
|
||||||
|
@ -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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user