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 2022/05/25 01:43:25 UTC

[GitHub] [apisix] spacewander commented on a diff in pull request #7116: fix(grpc-transcode): pb_option should be set on the route

spacewander commented on code in PR #7116:
URL: https://github.com/apache/apisix/pull/7116#discussion_r881125836


##########
apisix/plugins/grpc-transcode/util.lua:
##########
@@ -51,6 +53,35 @@ function _M.find_method(proto, service, method)
 end
 
 
+function _M.set_options(proto, options)
+    local cur_opts = proto.options
+    if cur_opts then
+        if cur_opts == options then
+            return
+        end
+
+        local same = true
+        table.sort(options)
+        for i, v in ipairs(options) do
+            if cur_opts[i] ~= v then
+                same = false
+                break
+            end
+        end

Review Comment:
   Good catch!



-- 
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: notifications-unsubscribe@apisix.apache.org

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