Skip to content

Commit ee3119d

Browse files
committed
Critical bug fix: Fix cluster-mode TLS disabled client to properly take received IPs when DNS is expanded
1 parent ca36bd4 commit ee3119d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

redis/src/aio/connection.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,12 @@ pub(crate) async fn connect_simple<T: RedisRuntime>(
450450
) -> RedisResult<(T, Option<IpAddr>)> {
451451
Ok(match connection_info.addr {
452452
ConnectionAddr::Tcp(ref host, port) => {
453+
if let Some(socket_addr) = _socket_addr {
454+
return Ok::<_, RedisError>((
455+
<T>::connect_tcp(socket_addr).await?,
456+
Some(socket_addr.ip()),
457+
));
458+
}
453459
let socket_addrs = get_socket_addrs(host, port).await?;
454460
select_ok(socket_addrs.map(|socket_addr| {
455461
info!("IP of node {:?} is {:?}", host, socket_addr.ip());

0 commit comments

Comments
 (0)