Fix RateBasedLimitter factory to get double instead of long rate for initialization
Closes from aman1309/fix-double-ratelimiting
@@ -53,7 +53,7 @@ public class RateBasedLimiter extends NonRefillableLimiter {
if (!config.hasPath(QPS_KEY)) {
throw new RuntimeException("Missing key " + QPS_KEY);
}
- return new RateBasedLimiter(config.getLong(QPS_KEY));
+ return new RateBasedLimiter(config.getDouble(QPS_KEY));
}
}
