Skip to content

Commit

Permalink
storage: fix some issues for mirror health checking
Browse files Browse the repository at this point in the history
Signed-off-by: Bin Tang <tangbin.bin@bytedance.com>
  • Loading branch information
sctb512 committed Nov 3, 2022
1 parent 9f5d136 commit 20532a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions storage/src/backend/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ impl Connection {
connection.start_proxy_health_thread(config.connect_timeout as u64);

// Start mirrors' health checking thread.
connection.start_mirror_health_thread(config.timeout as u64);
connection.start_mirrors_health_thread(config.timeout as u64);

Ok(connection)
}
Expand Down Expand Up @@ -351,7 +351,7 @@ impl Connection {
}
}

fn start_mirror_health_thread(&self, timeout: u64) {
fn start_mirrors_health_thread(&self, timeout: u64) {
for mirror in self.mirrors.iter() {
let mirror_cloned = mirror.clone();
thread::spawn(move || {
Expand Down
4 changes: 2 additions & 2 deletions storage/src/backend/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ impl Registry {

for mirror in mirrors.iter() {
if !mirror.config.auth_through {
registry.run_refresh_token_thread();
registry.start_refresh_token_thread();
info!("Refresh token thread started.");
break;
}
Expand Down Expand Up @@ -681,7 +681,7 @@ impl Registry {
}
}

fn run_refresh_token_thread(&self) {
fn start_refresh_token_thread(&self) {
let conn = self.connection.clone();
let state = self.state.clone();
// The default refresh token internal is 10 minutes.
Expand Down

0 comments on commit 20532a6

Please sign in to comment.