]> git.kaiwu.me - nginx.git/commit
SSL: reset ready flag if recv(MSG_PEEK) found no bytes in socket.
authorRoman Arutyunyan <arut@nginx.com>
Mon, 2 Mar 2015 18:15:46 +0000 (21:15 +0300)
committerRoman Arutyunyan <arut@nginx.com>
Mon, 2 Mar 2015 18:15:46 +0000 (21:15 +0300)
commit46a2236f226d7a68a6e830b8fd2c618c12bf4ca9
tree7a7767a0635b722c9a9dfc3f2b95644dadc55630
parentf0b5f833780b5a27f607f18fef56b047f6ffead1
SSL: reset ready flag if recv(MSG_PEEK) found no bytes in socket.

Previously, connection hung after calling ngx_http_ssl_handshake() with
rev->ready set and no bytes in socket to read.  It's possible in at least the
following cases:

 - when processing a connection with expired TCP_DEFER_ACCEPT on Linux
 - after parsing PROXY protocol header if it arrived in a separate TCP packet

Thanks to James Hamlin.
src/http/ngx_http_request.c