ソースを参照

log first time connection is verified ok

master
Jonathan Cobb 4年前
コミット
b3b65b82c7
2個のファイルの変更5行の追加5行の削除
  1. +1
    -1
      src/admin.rs
  2. +4
    -4
      src/ssh.rs

+ 1
- 1
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(),


+ 4
- 4
src/ssh.rs ファイルの表示

@@ -235,7 +235,7 @@ async fn check_ssh (ssh_container : Arc<Mutex<SshContainer>>,
.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<Mutex<SshContainer>>,
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<Mutex<SshContainer>>,
},
_ => {
error!("check_ssh: error checking tunnel status via {}: status={:?} body={}", check_url, &status_code, body);
conn_error = true;
conn_ok = false;
}
}
if deleted {


読み込み中…
キャンセル
保存