Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect log statements #20

Open
chirag-manwani opened this issue Feb 24, 2022 · 0 comments
Open

Incorrect log statements #20

chirag-manwani opened this issue Feb 24, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@chirag-manwani
Copy link
Collaborator

chirag-manwani commented Feb 24, 2022

Summary

The log statements which notify state changes are not correct, there seems to be an issue with the (order of the) arguments passed to the notify function. Looks like the first argument being passed is self.

On this line, https://github.com/dream11/lua-circuit-breaker/blob/master/src/breaker.lua#L134, the notify function should be called like this
self.notify(cb_name, new_state)
Also, there should be a check if notify is nil or not since there is no default value.

@chirag-manwani chirag-manwani self-assigned this Feb 24, 2022
@chirag-manwani chirag-manwani added the bug Something isn't working label Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant