From 6f14d5d084f50ee1384727ce04272a7826848503 Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Thu, 2 Jul 2020 11:54:49 -0500 Subject: [PATCH] Fix stupid bug in the latency calculation --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index fcaf128..9f9b870 100644 --- a/src/main.rs +++ b/src/main.rs @@ -133,10 +133,10 @@ fn main() { let stun_counter_vec_copy = stun_counter_vec.clone(); let stun_latency_vec_copy = stun_latency_vec.clone(); let s = s.clone(); - let now = SystemTime::now(); let domain_name = *stun_servers_copy.get(i).unwrap(); let connect_thread = thread::Pending::new(move || { loop { + let now = SystemTime::now(); eprintln!("Attempting to connect to {}", domain_name); match attempt_stun_connect(s) { Ok(finish_time) => {