[PATCH] use signed value when comparing timer with 0 and check lingering_time setting

Maxim Dounin mdounin at mdounin.ru
Mon May 13 14:26:34 UTC 2013


On Sat, Apr 27, 2013 at 12:43:21PM +0800, lanshun zhou wrote:

> In ngx_http_lingering_close_handler
> and ngx_http_discarded_request_body_handler, there's risk
> that r->lingering_time is smaller than ngx_time(), then comparing timer
> which is a unsigned value  with zero will never return true. This can cause
> long time connection for some kind of requests (For example, lingering_time
> is set smaller than lingering_timeout)

I've pushed slightly different patch which addresses both the 
original problem and concerns about systems with unsigned time_t:


Part of the patch which added configuration time checks was 
dropped, as it looks unneded.


Maxim Dounin

More information about the nginx-devel mailing list