Re: Remove unused codes in ngx_http_upstream_connect

2023-04-21 Thread Maxim Dounin
Hello! On Fri, Apr 21, 2023 at 02:51:56AM +, meng lynch wrote: > Another question, can I remove line 666 to 675 in > ngx_http_upstream_init_request? Because the state will be > created in ngx_http_upstream_connect. An empty upstream state is used to separate different upstream module invo

Re: Remove unused codes in ngx_http_upstream_connect

2023-04-20 Thread meng lynch
Thanks Another question, can I remove line 666 to 675 in ngx_http_upstream_init_request? Because the state will be created in ngx_http_upstream_connect. 546 static void 547 ngx_http_upstream_init_request(ngx_http_request_t *r) 548 { 549 ngx_str_t *host; 550 ngx_

Re: Remove unused codes in ngx_http_upstream_connect

2023-04-20 Thread Maxim Dounin
Hello! On Thu, Apr 20, 2023 at 02:24:53PM +, meng lynch wrote: > Hello guys, > > Should the code from line 1517 to 1519 be removed? Because u->state is > reallocated in line 1521. > > 1509 static void > 1510 ngx_http_upstream_connect(ngx_http_request_t *r, ngx_http_upstream_t *u) > 1511 {