Skip to content

Commit

Permalink
Call to refresh_connections only if failed_conn isn't empty
Browse files Browse the repository at this point in the history
  • Loading branch information
barshaul committed Jul 3, 2024
1 parent b381062 commit 80749e4
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions redis/src/cluster_async/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1447,12 +1447,14 @@ where
}
drop(read_guard);

Self::refresh_connections(
inner,
failed_connections,
RefreshConnectionType::OnlyManagementConnection,
)
.await;
if !failed_connections.is_empty() {
Self::refresh_connections(
inner,
failed_connections,
RefreshConnectionType::OnlyManagementConnection,
)
.await;
}

false
}
Expand Down

0 comments on commit 80749e4

Please sign in to comment.