Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed Dec 3, 2024
1 parent e77cafc commit 509a30d
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions kong/clustering/rpc/socket.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,21 @@ function _M._dispatch(premature, self, cb, payload)
if not res then
ngx_log(ngx_WARN, "[rpc] RPC callback failed: ", err)

if payload.id then
res, err = self.outgoing:push(new_error(payload.id, jsonrpc.SERVER_ERROR,
err))
if not res then
ngx_log(ngx_WARN, "[rpc] unable to push RPC call error: ", err)
end
-- notification has no response
if not payload.id then
return
end

res, err = self.outgoing:push(new_error(payload.id, jsonrpc.SERVER_ERROR,
err))
if not res then
ngx_log(ngx_WARN, "[rpc] unable to push RPC call error: ", err)
end

return
end

-- it is a notification
-- notification has no response
if not payload.id then
return
end
Expand Down

0 comments on commit 509a30d

Please sign in to comment.