Skip to content

Commit 40e4908

Browse files
committed
Bump version to v1.24.1
1 parent e9c0846 commit 40e4908

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

cmd/daze/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ var Conf = struct {
3131
}{
3232
PathRule: "/rule.ls",
3333
PathCIDR: "/rule.cidr",
34-
Version: "v1.24.0",
34+
Version: "v1.24.1",
3535
}
3636

3737
const helpMsg = `Usage: daze <command> [<args>]

lib/rate/rate.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type Limits struct {
2121

2222
// Wait ensures there are enough resources (n) available, blocking if necessary.
2323
func (l *Limits) Wait(n uint64) {
24-
doa.Doa(n > 0 && n < math.MaxUint64/2)
24+
doa.Doa(n < math.MaxUint64/2)
2525
l.mu.Lock()
2626
defer l.mu.Unlock()
2727
l.loop = uint64(time.Since(l.last) / l.step)
@@ -43,7 +43,8 @@ func (l *Limits) Wait(n uint64) {
4343

4444
// NewLimits creates a new rate limiter with rate r over period p.
4545
func NewLimits(r uint64, p time.Duration) *Limits {
46-
doa.Doa(r > 0 && r < math.MaxUint64/2)
46+
doa.Doa(r > 0)
47+
doa.Doa(r < math.MaxUint64/2)
4748
doa.Doa(p > 0)
4849
g := func(a, b uint64) uint64 {
4950
t := uint64(0)

0 commit comments

Comments
 (0)