Skip to content

Commit

Permalink
fix(clustering/rpc): rpc_capabilities should be encoded as array (#…
Browse files Browse the repository at this point in the history
…13934)

KAG-5912

(cherry picked from commit ad5fdef)
  • Loading branch information
chronolaw authored and github-actions[bot] committed Nov 27, 2024
1 parent c98f385 commit a4787b1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kong/clustering/rpc/callbacks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ local _M = {}
local _MT = { __index = _M, }


local cjson = require("cjson.safe")
local utils = require("kong.clustering.rpc.utils")


Expand All @@ -15,6 +16,9 @@ function _M.new()
capabilities_list = {}, -- updated as register() is called
}

-- it should always be an array when json encoding
setmetatable(self.capabilities_list, cjson.array_mt)

return setmetatable(self, _MT)
end

Expand Down

0 comments on commit a4787b1

Please sign in to comment.