From b3b65b82c78e891d2edce8aef68c10f3e3ecbec1 Mon Sep 17 00:00:00 2001 From: Jonathan Cobb Date: Wed, 9 Sep 2020 00:09:14 -0400 Subject: [PATCH] log first time connection is verified ok --- src/admin.rs | 2 +- src/ssh.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/admin.rs b/src/admin.rs index 0187b73..91c59bb 100644 --- a/src/admin.rs +++ b/src/admin.rs @@ -191,7 +191,7 @@ async fn handle_register(registration : AdminRegistration, )) } else { let reg_response: BubbleRegistrationResponse = reg_opt.unwrap(); - info!("handle_register: parsed response object: {:?}", reg_response); + trace!("handle_register: parsed response object: {:?}", reg_response); let ssh_result = spawn_ssh( ssh_container.clone(), internal_reg.ip.clone(), diff --git a/src/ssh.rs b/src/ssh.rs index 5c02a27..997f343 100644 --- a/src/ssh.rs +++ b/src/ssh.rs @@ -235,7 +235,7 @@ async fn check_ssh (ssh_container : Arc>, .default_headers(headers) .build().unwrap(); let mut error_count : u8 = 0; - let mut conn_error : bool = false; + let mut conn_ok : bool = false; let mut deleted : bool = false; let start_time = now_micros(); @@ -297,13 +297,13 @@ async fn check_ssh (ssh_container : Arc>, error_count = error_count + 1; } "active" => { - if error_count > 0 || conn_error { + if error_count > 0 || !conn_ok { info!("check_ssh: tunnel status via {}: tunnel status is OK", check_url); } else { trace!("check_ssh: tunnel status via {}: tunnel status is OK", check_url); } error_count = 0; - conn_error = false; + conn_ok = true; } "unreachable" => { debug!("check_ssh: tunnel status via {}: tunnel is unreachable", check_url); @@ -321,7 +321,7 @@ async fn check_ssh (ssh_container : Arc>, }, _ => { error!("check_ssh: error checking tunnel status via {}: status={:?} body={}", check_url, &status_code, body); - conn_error = true; + conn_ok = false; } } if deleted {