Hello, 

if you return control to the nginx event loop while generating the 
response, you may set appropriate events to detect if the client 
closed the connection.  See ngx_http_upstream_check_broken_connection() 
and related things in the ngx_http_upstream.c for an example.

Yes, it’s fine, I will take a deeper look at upstream module to find out the 
answer. Thanks. 

Log module, once you use $bytes_sent (or $body_bytes_sent, as 
logged by default) variable, logs the number of bytes sent to the 
client.  It is not the same as the number of bytes actually 
received by the client though, because there are bytes which are 
sent (i.e., passed by nginx to the socket buffer) but not yet 
received.

Well, this means there’s another parameter in log module which actually log 
number of bytes client received (other than $body_bytes_sent or $bytes_sent). ?




--
Hưng
Email: hun...@opensource.com.vn



> On Feb 12, 2015, at 8:52 PM, Maxim Dounin <mdou...@mdounin.ru> wrote:
> 
> f you return control to the nginx event loop while generating the 
> response, you may set appropriate events to detect if the client 
> closed the connection.  See ngx_http_upstream_check_broken_connection() 
> and related things in the ngx_http_upstream.c for an example.

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel

Reply via email to