summaryrefslogtreecommitdiffhomepage
path: root/HTTP
diff options
context:
space:
mode:
Diffstat (limited to 'HTTP')
-rw-r--r--HTTP/RateLimit.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/HTTP/RateLimit.hs b/HTTP/RateLimit.hs
index 3a17a5a..591c918 100644
--- a/HTTP/RateLimit.hs
+++ b/HTTP/RateLimit.hs
@@ -399,7 +399,7 @@ checkRequestRate cfg storedir ratelimiter logger intervalsecs = do
let storesize = maximum knownObjectSizes
n <- liftIO $ atomically $ swapTMVar (requestCounter ratelimiter) 0
let maxstoredinterval = n * fromIntegral storesize
- let maxstoredthismonth = maxstoredinterval * (intervalsecs `div` (60*60)) * 24 * 31
+ let maxstoredthismonth = maxstoredinterval * (intervalsecs * 24*31 `div` (60*60))
freespace <- diskFree <$> localDiskUsage storedir
let target = monthsToFillHalfDisk cfg
let estimate = if maxstoredthismonth <= 0