monkeyDluffy6017 commented on code in PR #9995:
URL: https://github.com/apache/apisix/pull/9995#discussion_r1335427566


##########
apisix/plugins/traffic-split.lua:
##########
@@ -200,7 +200,7 @@ local function new_rr_obj(weighted_upstreams)
     for i, upstream_obj in ipairs(weighted_upstreams) do
         if upstream_obj.upstream_id then
             server_list[upstream_obj.upstream_id] = upstream_obj.weight
-        elseif upstream_obj.upstream then
+        elseif upstream_obj.upstream and type(upstream_obj.upstream) == 
"table" then

Review Comment:
   We cannot just add the check here,  The `upstream_obj.upstream` is used in 
other parts of the code as well, so we should find why the `upstream` is a 
string, or we need to add the check everywhere we use it



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to