ready_queue: increment attempts after exhausting connection candidates

Previously we'd just use the default error case and retry 1 minute
later, but for sites with broken tls where we can never make a
connection without changing our configuration to skip tls, we don't
want to keep retrying every minute and instead want to follow the
normal queue exponential backoff.
This commit is contained in:
Wez Furlong
2023-06-24 06:58:43 -07:00
parent f69709e34c
commit f294b6f65c
+2 -1
View File
@@ -492,7 +492,7 @@ impl Dispatcher {
.have_more_connection_candidates(&mut dispatcher)
.await
{
if let Some(msg) = dispatcher.msg.as_ref() {
if let Some(msg) = dispatcher.msg.take() {
log_disposition(LogDisposition {
kind: RecordType::TransientFailure,
msg: msg.clone(),
@@ -515,6 +515,7 @@ impl Dispatcher {
delivery_protocol: Some(&dispatcher.delivery_protocol),
})
.await;
Dispatcher::requeue_message(msg, true, None).await?;
}
if consecutive_connection_failures.fetch_add(1, Ordering::SeqCst)