Skip to content

Commit 81f9f51

Browse files
authored
Merge pull request #64 from faststats-dev/min
Cap metrics scheduling delays to safe minimums
2 parents a133d40 + a5a9489 commit 81f9f51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/java/dev/faststats/core/SimpleMetrics.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ private void startSubmitting(long initialDelay, long period, TimeUnit unit) {
149149
} catch (Throwable t) {
150150
error("Failed to submit metrics", t);
151151
}
152-
}, initialDelay, period, unit);
152+
}, Math.max(0, initialDelay), Math.max(1000, period), unit);
153153
}
154154

155155
protected boolean isSubmitting() {

0 commit comments

Comments
 (0)