Skip to content

bugfix: append new parameters to ngx_lua_ffi_balancer_set_current_pee… #476

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
const unsigned char *host, ssize_t host_len,
char **err);
char **err,
const unsigned char *host, ssize_t host_len);

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,
errmsg)
host and #host or 0)
if rc == FFI_OK then
return true
end
Expand Down
Loading