From 97012d702eafe80d5186c817a09a169a7bcbf7c0 Mon Sep 17 00:00:00 2001 From: Weston Schmidt Date: Fri, 13 Jul 2018 14:54:04 -0700 Subject: [PATCH] Add a function that returns that it should ALWAYS retry when delivery failed. This will cause Caduceus to attempt delivery up to the maximum number of specified deliveries, regardless of the source of error. --- src/caduceus/outboundSender.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/caduceus/outboundSender.go b/src/caduceus/outboundSender.go index a88d859a..d9e1508b 100644 --- a/src/caduceus/outboundSender.go +++ b/src/caduceus/outboundSender.go @@ -463,6 +463,8 @@ func (obs *CaduceusOutboundSender) worker(id int) { Retries: obs.deliveryRetries, Interval: obs.deliveryInterval, Counter: simpleCounter, + // Always retry on failures up to the max count. + ShouldRetry: func(error) bool { return true }, } // Only optimize the successful answers