You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/04/23 03:59:39 UTC

[GitHub] [apisix] Ben0625 opened a new pull request #4116: only one_loop is needed instead of double loop

Ben0625 opened a new pull request #4116:
URL: https://github.com/apache/apisix/pull/4116


   Fix #4103 
   
   ### Pre-submission checklist:
   
   * [√] Did you explain what problem does this PR solve? Or what new features have been added?
   * [ ] Have you added corresponding test cases?
   * [√] Have you modified the corresponding document?
   * [ ] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix/tree/master#community) first**
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on a change in pull request #4116: fix(healthcheck): only one_loop is needed in the passive health check report

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #4116:
URL: https://github.com/apache/apisix/pull/4116#discussion_r618929579



##########
File path: apisix/init.lua
##########
@@ -615,13 +615,11 @@ local function healthcheck_passive(api_ctx)
     end
 
     for i, status in ipairs(http_statuses) do
-        for i, status in ipairs(http_statuses) do
-            if resp_status == status then
-                checker:report_http_status(api_ctx.balancer_ip,
-                                           port or api_ctx.balancer_port,
-                                           host,
-                                           resp_status)
-            end
+        if resp_status == status then
+            checker:report_http_status(api_ctx.balancer_ip,
+            			       port or api_ctx.balancer_port,

Review comment:
       @Ben0625
   You can create another commit in this branch to fix it, and push it again.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on a change in pull request #4116: fix(healthcheck): only one_loop is needed in the passive health check report

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #4116:
URL: https://github.com/apache/apisix/pull/4116#discussion_r618925530



##########
File path: apisix/init.lua
##########
@@ -615,13 +615,11 @@ local function healthcheck_passive(api_ctx)
     end
 
     for i, status in ipairs(http_statuses) do
-        for i, status in ipairs(http_statuses) do
-            if resp_status == status then
-                checker:report_http_status(api_ctx.balancer_ip,
-                                           port or api_ctx.balancer_port,
-                                           host,
-                                           resp_status)
-            end
+        if resp_status == status then
+            checker:report_http_status(api_ctx.balancer_ip,
+            			       port or api_ctx.balancer_port,

Review comment:
       Please keep the original indentation with space




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander merged pull request #4116: fix(healthcheck): only one_loop is needed in the passive health check report

Posted by GitBox <gi...@apache.org>.
spacewander merged pull request #4116:
URL: https://github.com/apache/apisix/pull/4116


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander merged pull request #4116: fix(healthcheck): only one_loop is needed in the passive health check report

Posted by GitBox <gi...@apache.org>.
spacewander merged pull request #4116:
URL: https://github.com/apache/apisix/pull/4116


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org