diff --git a/backend/src/main/java/org/cryptomator/hub/license/RandomMinuteSleeper.java b/backend/src/main/java/org/cryptomator/hub/license/RandomMinuteSleeper.java index b2d14fa9..f5b005e7 100644 --- a/backend/src/main/java/org/cryptomator/hub/license/RandomMinuteSleeper.java +++ b/backend/src/main/java/org/cryptomator/hub/license/RandomMinuteSleeper.java @@ -8,10 +8,14 @@ public class RandomMinuteSleeper { private static final long MINUTE_IN_MILLIS = 60 * 1000L; - private static final Random RNG = new Random(); + private final Random rng; + + public RandomMinuteSleeper() { + this.rng = new Random(); + } void sleep() throws InterruptedException { - Thread.sleep(RNG.nextInt(0, 60) * MINUTE_IN_MILLIS); + Thread.sleep(rng.nextInt(0, 60) * MINUTE_IN_MILLIS); } }