Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: tzssangglass <[email protected]>
  • Loading branch information
tzssangglass committed Mar 16, 2024
1 parent 0cd95cc commit 05d3985
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions lualib/resty/kong/peer_conn.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
local ffi = require "ffi"
local base = require "resty.core.base"

local orig_get_request = base.get_request
local get_request = base.get_request
local errmsg = base.get_errmsg_ptr()
local C = ffi.C
local ffi_str = ffi.string
Expand All @@ -18,17 +18,6 @@ ngx_http_lua_kong_ffi_get_last_peer_connection_cached(ngx_http_request_t *r,
]]


local function get_request()
local r = orig_get_request()

if not r then
error("no request found")
end

return r
end


local function get_last_peer_connection_cached()
if get_phase() ~= "balancer" then
error("get_last_peer_connection_cached() can only be called in balancer phase")
Expand Down

0 comments on commit 05d3985

Please sign in to comment.