openresty / lua-resty-upstream-healthcheck

Health Checker for Nginx Upstream Servers in Pure Lua
521 stars 134 forks source link

Bad local #54

Closed Tieske closed 5 years ago

Tieske commented 6 years ago

nthr is created on line 293. Then a new one on line 316 shadows the outer one. This means that values set on the inner one will be lost when the scope ends, and on line 356, the result will always be falsy, and hence the code will never run.

Fixes #16

Tieske commented 6 years ago

@agentzh any update? this actually is a bug, see #16

Tieske commented 5 years ago

ping @agentzh @doujiang24

Tieske commented 5 years ago

@doujiang24 I've got too many other things going on right now, and we're not using this module any more

agentzh commented 5 years ago

@thibaultcha Will you take care of this one please?

thibaultcha commented 5 years ago

Closed in favor of #59 which comes with a test case and additional fixes. Thanks @Tieske for the catch.