false
This commit is contained in:
parent
49b7b09516
commit
ef40809f81
8
limit.go
8
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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue