From 425f61cf34b59f81d51d4d95d52ce768985b28d9 Mon Sep 17 00:00:00 2001 From: Audrius Butkevicius Date: Mon, 21 Sep 2015 21:50:39 +0000 Subject: [PATCH] Division by zero not good --- cmd/strelaypoolsrv/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/strelaypoolsrv/main.go b/cmd/strelaypoolsrv/main.go index 375bdaea7..9244c99ed 100644 --- a/cmd/strelaypoolsrv/main.go +++ b/cmd/strelaypoolsrv/main.go @@ -82,10 +82,10 @@ func main() { flag.BoolVar(&debug, "debug", debug, "Enable debug output") flag.DurationVar(&evictionTime, "eviction", evictionTime, "After how long the relay is evicted") flag.IntVar(&getLRUSize, "get-limit-cache", getLRUSize, "Get request limiter cache size") - flag.IntVar(&getLimitAvg, "get-limit-avg", getLimitAvg, "Allowed average get request rate, per 10 s") + flag.IntVar(&getLimitAvg, "get-limit-avg", 2, "Allowed average get request rate, per 10 s") flag.Int64Var(&getLimitBurst, "get-limit-burst", getLimitBurst, "Allowed burst get requests") flag.IntVar(&postLRUSize, "post-limit-cache", postLRUSize, "Post request limiter cache size") - flag.IntVar(&postLimitAvg, "post-limit-avg", postLimitAvg, "Allowed average post request rate, per minute") + flag.IntVar(&postLimitAvg, "post-limit-avg", 2, "Allowed average post request rate, per minute") flag.Int64Var(&postLimitBurst, "post-limit-burst", postLimitBurst, "Allowed burst post requests") flag.Parse()