fix: connections availability check
This commit is contained in:
parent
706619c504
commit
8d680f3750
1 changed files with 6 additions and 18 deletions
|
@ -73,24 +73,12 @@ impl ExternalConnection {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Start external connections availability check at another thread.
|
/// Check external connections availability at another thread.
|
||||||
pub fn start_ext_conn_availability_check() {
|
pub fn start_ext_conn_availability_check() {
|
||||||
std::thread::spawn(move || {
|
let conn_list = ConnectionsConfig::ext_conn_list();
|
||||||
let chain_type = AppConfig::chain_type();
|
for conn in conn_list {
|
||||||
loop {
|
// Check every connection at separate thread.
|
||||||
// Check external connections URLs availability.
|
conn.check_conn_availability();
|
||||||
let conn_list = ConnectionsConfig::ext_conn_list();
|
}
|
||||||
for conn in conn_list {
|
|
||||||
// Check every connection at separate thread.
|
|
||||||
conn.check_conn_availability();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Stop checking if connections are not showing or network type was changed.
|
|
||||||
if !AppConfig::show_connections_network_panel()
|
|
||||||
|| chain_type != AppConfig::chain_type() {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue