Skip to content

Commit 7f418c3

Browse files
assign addr to host not addr_text
1 parent fa8714e commit 7f418c3

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

patch/1.27.1.1/ngx_lua-enable_keepalive.patch

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git src/ngx_http_lua_balancer.c src/ngx_http_lua_balancer.c
2-
index ae0f1380..f5163e5d 100644
2+
index ae0f1380..bfedaa9e 100644
33
--- src/ngx_http_lua_balancer.c
44
+++ src/ngx_http_lua_balancer.c
55
@@ -31,10 +31,39 @@ typedef struct {
@@ -632,7 +632,15 @@ index ae0f1380..f5163e5d 100644
632632
{
633633
ngx_url_t url;
634634
ngx_http_lua_ctx_t *ctx;
635-
@@ -927,25 +1102,8 @@ ngx_http_lua_ffi_balancer_set_current_peer(ngx_http_request_t *r,
635+
@@ -920,32 +1095,15 @@ ngx_http_lua_ffi_balancer_set_current_peer(ngx_http_request_t *r,
636+
if (url.addrs && url.addrs[0].sockaddr) {
637+
bp->sockaddr = url.addrs[0].sockaddr;
638+
bp->socklen = url.addrs[0].socklen;
639+
- bp->addr_text = &url.addrs[0].name;
640+
+ bp->host = &url.addrs[0].name;
641+
642+
} else {
643+
*err = "no host allowed";
636644
return NGX_ERROR;
637645
}
638646

0 commit comments

Comments
 (0)