Skip to content

Commit b954618

Browse files
committed
Call to refresh_connections only if failed_conn isn't empty
1 parent 4571c91 commit b954618

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

redis/src/cluster_async/mod.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1448,12 +1448,14 @@ where
14481448
}
14491449
drop(read_guard);
14501450

1451-
Self::refresh_connections(
1452-
inner,
1453-
failed_connections,
1454-
RefreshConnectionType::OnlyManagementConnection,
1455-
)
1456-
.await;
1451+
if !failed_connections.is_empty() {
1452+
Self::refresh_connections(
1453+
inner,
1454+
failed_connections,
1455+
RefreshConnectionType::OnlyManagementConnection,
1456+
)
1457+
.await;
1458+
}
14571459

14581460
false
14591461
}

0 commit comments

Comments
 (0)