Skip to content

Commit

Permalink
strict limited conn
Browse files Browse the repository at this point in the history
  • Loading branch information
zyxkad committed Feb 22, 2024
1 parent 9e55bb4 commit 224ee14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions limited_conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 224ee14

Please sign in to comment.