mirror of
https://github.com/nginx/nginx.git
synced 2024-12-20 06:03:31 -06:00
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.
This commit is contained in:
parent
f0b5f83378
commit
46a2236f22
@ -652,6 +652,7 @@ ngx_http_ssl_handshake(ngx_event_t *rev)
|
||||
|
||||
if (n == -1) {
|
||||
if (err == NGX_EAGAIN) {
|
||||
rev->ready = 0;
|
||||
|
||||
if (!rev->timer_set) {
|
||||
ngx_add_timer(rev, c->listening->post_accept_timeout);
|
||||
|
Loading…
Reference in New Issue
Block a user