﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
320	nginx should reliably check client connection close with pending data	Sergey Kandaurov		"recv(MSG_PEEK) is the generic way to test when connection was closed.
This works on all platforms, except with pending data.

It is not possible to reliably detect with standard socket interface
if the client connection was closed with pending data. This covers:
- ssl connection
- pipelined request

This results in that nginx doesn't drop backend proxy_pass connection
and sockets stay in CLOSE_WAIT state forever.
(It was reported that time can be reduced with proxy_read_timeout.)

To solve this, a hint could be used to indicate EOF event such as:
1) SSL_peek() for https.  But that doesn't cover http.
2) OS-provided filter-specific EOF condition on every supported platform:
- BSD kqueue EV_EOF (already present)
- Linux epoll
- ...

References:
http://mailman.nginx.org/pipermail/nginx/2011-June/027669.html
http://mailman.nginx.org/pipermail/nginx/2011-November/030614.html
http://mailman.nginx.org/pipermail/nginx/2013-March/038119.html"	enhancement	new	minor		nginx-core	1.3.x					n/a
