Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dndx committed Apr 24, 2024
1 parent 4bd9c18 commit 21b34f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion kong/clustering/rpc/concentrator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ function _M:start(delay)
local delay = math.random(5, 10)

ngx_log(ngx_ERR, "[rpc] concentrator event loop error: ",
res_or_perr or err, ", reconecting in ",
res_or_perr or err, ", reconnecting in ",
math.floor(delay), " seconds")

local res, err = lconn:disconnect()
Expand Down
6 changes: 3 additions & 3 deletions kong/clustering/rpc/manager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function _M:_local_call(node_id, method, params)
cap .. ", node_id: " .. node_id
end

local s = next(self.clients[node_id])
local s = next(self.clients[node_id]) -- TODO: better LB?

local fut = future.new(node_id, s, method, params)
assert(fut:start())
Expand Down Expand Up @@ -312,13 +312,13 @@ function _M:connect(premature, node_id, host, path, cert, key)
do
local resp_headers = c:get_resp_headers()
-- FIXME: resp_headers should not be case sensitive
if not resp_headers or not resp_headers["X-Kong-RPC-Capabilities"] then
if not resp_headers or not resp_headers["x_kong_rpc_capabilities"] then
ngx_log(ngx_ERR, "[rpc] peer did not provide capability list, node_id: ", node_id)
c:send_close() -- can't do much if this fails
goto err
end

local capabilities = resp_headers["X-Kong-RPC-Capabilities"]
local capabilities = resp_headers["x_kong_rpc_capabilities"]
capabilities = cjson_decode(capabilities)
if not capabilities then
ngx_log(ngx_ERR, "[rpc] unable to decode peer capability list, node_id: ", node_id,
Expand Down

0 comments on commit 21b34f6

Please sign in to comment.