diff --git a/redis/src/cluster_async/mod.rs b/redis/src/cluster_async/mod.rs index 4907c8d59..fe893d8b3 100644 --- a/redis/src/cluster_async/mod.rs +++ b/redis/src/cluster_async/mod.rs @@ -343,7 +343,7 @@ enum Next { }, Reconnect { request: PendingRequest, - target: OperationTarget, + target: String, }, RefreshSlots { request: PendingRequest, @@ -385,7 +385,7 @@ where let address = match target { OperationTarget::Node { address } => address, OperationTarget::FanOut => { - // TODO - implement retries on fan-out operations + // Fanout operation are retried per internal request, and don't need additional retries. self.respond(Err(err)); return Next::Done.into(); } @@ -428,7 +428,7 @@ where } ErrorKind::IoError => Next::Reconnect { request: this.request.take().unwrap(), - target: OperationTarget::Node { address }, + target: address, } .into(), _ => { @@ -1073,13 +1073,8 @@ where Next::Reconnect { request, target, .. } => { - poll_flush_action = match target { - OperationTarget::Node { address } => poll_flush_action - .change_state(PollFlushAction::Reconnect(vec![address])), - OperationTarget::FanOut => { - poll_flush_action.change_state(PollFlushAction::RebuildSlots) - } - }; + poll_flush_action = + poll_flush_action.change_state(PollFlushAction::Reconnect(vec![target])); self.inner.pending_requests.lock().unwrap().push(request); } }