Fix stupid bug in the latency calculation

This commit is contained in:
Jeremy Wall 2020-07-02 11:54:49 -05:00
parent 4780c056e6
commit 6f14d5d084

View File

@ -133,10 +133,10 @@ fn main() {
let stun_counter_vec_copy = stun_counter_vec.clone(); let stun_counter_vec_copy = stun_counter_vec.clone();
let stun_latency_vec_copy = stun_latency_vec.clone(); let stun_latency_vec_copy = stun_latency_vec.clone();
let s = s.clone(); let s = s.clone();
let now = SystemTime::now();
let domain_name = *stun_servers_copy.get(i).unwrap(); let domain_name = *stun_servers_copy.get(i).unwrap();
let connect_thread = thread::Pending::new(move || { let connect_thread = thread::Pending::new(move || {
loop { loop {
let now = SystemTime::now();
eprintln!("Attempting to connect to {}", domain_name); eprintln!("Attempting to connect to {}", domain_name);
match attempt_stun_connect(s) { match attempt_stun_connect(s) {
Ok(finish_time) => { Ok(finish_time) => {