mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-14 18:30:02 +08:00
fix: didn't count failure in allow method with breaker algorithm (#4008)
This commit is contained in:
@@ -52,6 +52,7 @@ func (b *googleBreaker) accept() error {
|
||||
|
||||
func (b *googleBreaker) allow() (internalPromise, error) {
|
||||
if err := b.accept(); err != nil {
|
||||
b.markFailure()
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user