11diff --git lib/ngx/balancer.lua lib/ngx/balancer.lua
2- index 18bdc2c..cc1c61a 100644
2+ index 18bdc2c..3a98f53 100644
33--- lib/ngx/balancer.lua
44+++ lib/ngx/balancer.lua
55@@ -3,7 +3,7 @@
@@ -19,24 +19,25 @@ index 18bdc2c..cc1c61a 100644
1919
2020 local subsystem = ngx.config.subsystem
2121 local ngx_lua_ffi_balancer_set_current_peer
22- @@ -36,7 +37,7 @@ if subsystem == 'http' then
22+ @@ -35,8 +36,7 @@ if subsystem == 'http' then
23+ ffi.cdef[[
2324 int ngx_http_lua_ffi_balancer_set_current_peer(ngx_http_request_t *r,
2425 const unsigned char *addr, size_t addr_len, int port,
25- const unsigned char *host, ssize_t host_len,
26+ - const unsigned char *host, ssize_t host_len,
2627- char **err);
2728+ unsigned int cpool_crc32, unsigned int cpool_size, char **err);
2829
2930 int ngx_http_lua_ffi_balancer_enable_keepalive(ngx_http_request_t *r,
3031 unsigned long timeout, unsigned int max_requests, char **err);
31- @@ -130,6 +131 ,7 @@ else
32+ @@ -130,6 +130 ,7 @@ else
3233 error("unknown subsystem: " .. subsystem)
3334 end
3435
3536+ local DEFAULT_KEEPALIVE_POOL_SIZE = 30
3637 local DEFAULT_KEEPALIVE_IDLE_TIMEOUT = 60000
3738 local DEFAULT_KEEPALIVE_MAX_REQUESTS = 100
3839
39- @@ -143,27 +145 ,61 @@ local peer_state_names = {
40+ @@ -143,27 +144 ,61 @@ local peer_state_names = {
4041 local _M = { version = base.version }
4142
4243 if subsystem == "http" then
@@ -106,7 +107,7 @@ index 18bdc2c..cc1c61a 100644
106107 errmsg)
107108 if rc == FFI_OK then
108109 return true
109- @@ -172,26 +208 ,26 @@ if subsystem == "http" then
110+ @@ -172,26 +207 ,26 @@ if subsystem == "http" then
110111 return nil, ffi_str(errmsg[0])
111112 end
112113 else
0 commit comments