lua-resty-upstream-healthcheck
lua-resty-upstream-healthcheck copied to clipboard
Why not setkeepalive on tcp socket ?
For each healthcheck, you seem to close the socket, why not put it into the connection pool with sock:setkeepalive()
instead ?
https://github.com/openresty/lua-resty-upstream-healthcheck/blob/346f3a642b6717a26382e4032160aa766af0188c/lib/resty/upstream/healthcheck.lua#L275
the healthcheck.lua does not parse the full http response, maybe there are some data left in the socket. So we can not put it into the pool