Skip to content

Commit d441586

Browse files
committed
improved javadoc
1 parent b679dae commit d441586

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/main/java/org/fluentd/logger/sender/ConstantDelayReconnector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import java.util.LinkedList;
88

99
/**
10-
* Calculate exponential delay for reconnecting
10+
* Handles constant delay for reconnecting. The default delay is 50 ms.
1111
*/
1212
public class ConstantDelayReconnector implements Reconnector {
1313
private static final Logger LOG = LoggerFactory.getLogger(ConstantDelayReconnector.class);

src/main/java/org/fluentd/logger/sender/ExponentialDelayReconnector.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import 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
*/
89
public 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
}

0 commit comments

Comments
 (0)