Skip to content

Commit

Permalink
Update distributed_gobreaker.go
Browse files Browse the repository at this point in the history
  • Loading branch information
YoshiyukiMineo authored Dec 29, 2024
1 parent a373049 commit 50ad368
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions v2/distributed_gobreaker.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func NewDistributedCircuitBreaker[T any](store SharedDataStore, settings Setting

err = dcb.lock()
if err != nil {
return err
return nil, err
}
defer func() {
e := dcb.unlock()
Expand All @@ -57,7 +57,7 @@ func NewDistributedCircuitBreaker[T any](store SharedDataStore, settings Setting
}
}()

_, err := dcb.getSharedState()
_, err = dcb.getSharedState()
if err == ErrNoSharedState {
err = dcb.setSharedState(dcb.extract())
}
Expand Down

0 comments on commit 50ad368

Please sign in to comment.