File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
src/main/java/org/fluentd/logger/sender Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 77import java .util .LinkedList ;
88
99/**
10- * Calculate exponential delay for reconnecting
10+ * Handles constant delay for reconnecting. The default delay is 50 ms.
1111 */
1212public class ConstantDelayReconnector implements Reconnector {
1313 private static final Logger LOG = LoggerFactory .getLogger (ConstantDelayReconnector .class );
Original file line number Diff line number Diff line change 33import java .util .LinkedList ;
44
55/**
6- * Calcurate exponential delay for reconnecting
6+ * Calculates exponential delay for reconnecting. The start delay is 50ms and exponentionally grows to max 60 seconds in
7+ * function of the number of connection errors.
78 */
89public class ExponentialDelayReconnector implements Reconnector {
910
@@ -61,6 +62,6 @@ public boolean enableReconnection(long timestamp) {
6162 suppressMillis = waitMaxMillis ;
6263 }
6364
64- return (timestamp - errorHistory .getLast ()) > suppressMillis ;
65+ return (timestamp - errorHistory .getLast ()) >= suppressMillis ;
6566 }
6667}
You can’t perform that action at this time.
0 commit comments