From 224ee145abb2dda00afb6becae5300e1ec115b39 Mon Sep 17 00:00:00 2001 From: zyxkad Date: Wed, 21 Feb 2024 21:37:20 -0700 Subject: [PATCH] strict limited conn --- limited_conn.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/limited_conn.go b/limited_conn.go index 4d919398..9cd4c124 100644 --- a/limited_conn.go +++ b/limited_conn.go @@ -164,8 +164,8 @@ func (l *RateController) afterRead(n int, less int) time.Duration { l.readCount += n } if n >= avgRate { - // TODO: replace the magic number 3 - return time.Second / 3 + // TODO: replace the magic number + return time.Second } if l.readCount >= readRate { return diff