Skip to content

Commit

Permalink
Revert "bugfix: append new parameters to ngx_lua_ffi_balancer_set_cur…
Browse files Browse the repository at this point in the history
…rent_peer at function end."

This reverts commit cab6556.
  • Loading branch information
jiahao committed Jul 15, 2024
1 parent f024bfc commit 03b8673
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/ngx/balancer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ if subsystem == 'http' then
ffi.cdef[[
int ngx_http_lua_ffi_balancer_set_current_peer(ngx_http_request_t *r,
const unsigned char *addr, size_t addr_len, int port,
char **err,
const unsigned char *host, ssize_t host_len);
const unsigned char *host, ssize_t host_len,
char **err);

int ngx_http_lua_ffi_balancer_enable_keepalive(ngx_http_request_t *r,
unsigned long timeout, unsigned int max_requests, char **err);
Expand Down Expand Up @@ -162,9 +162,9 @@ if subsystem == "http" then

local rc = ngx_lua_ffi_balancer_set_current_peer(r, addr, #addr,
port,
errmsg,
host,
host and #host or 0)
host and #host or 0,
errmsg)
if rc == FFI_OK then
return true
end
Expand Down

0 comments on commit 03b8673

Please sign in to comment.