diff --git a/http/handler.go b/http/handler.go index 02b93e0..adeb252 100644 --- a/http/handler.go +++ b/http/handler.go @@ -337,6 +337,7 @@ func (this *Handler) logErr (name string, err error) { } func (this *Handler) rateLimit (req *http.Request, resource string, duration time.Duration) error { + if duration == 0 { return nil } host, _, _ := net.SplitHostPort(req.RemoteAddr) key := fmt.Sprintf("%s|%s", host, resource) table, done := this.rateLimitMap.Borrow()