fix: healthcheck to targets stopped after update upstream #100
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Same as #78, but rebased to
release/1.4.x
branch.Original description:
Hi,
As I reported in the issue Kong/kong#7652
When I updated an upstream, healthcheck to targets of this upstream has been stopped.
The bug is by using
weak table
andipairs
So, when I updated an upstream, Kong insert a new object contain upstream information to
hcs
tableWhen Lua GC removed old object of the upstream => loop with
ipairs
stopped when got firstnil
=> any upstream object after nil value not will be checkedCloses: #78