From ef40809f81533ec732b9b682ce97455adcd224dd Mon Sep 17 00:00:00 2001 From: jiangyong Date: Fri, 8 May 2026 18:52:53 +0800 Subject: [PATCH] false --- limit.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/limit.go b/limit.go index 4739bce..eea22b2 100644 --- a/limit.go +++ b/limit.go @@ -70,13 +70,13 @@ func (w *WindowsLimit) Allow() bool { succCmd := w.client.ZCount(w.option.succKey, fmt.Sprintf("%d", start), fmt.Sprintf("%d", now)) _, err := pipe.Exec() if err != nil { - return false + return true } - if succCmd.Val() >= w.option.Count { - return false + if succCmd.Val() <= w.option.Count { + return true } - return true + return false } func (w *WindowsLimit) Add(succ bool) error {