]> git.kaiwu.me - nginx.git/commitdiff
fix socket leak if deferred accept was used
authorIgor Sysoev <igor@sysoev.ru>
Fri, 4 Jan 2008 09:32:12 +0000 (09:32 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Fri, 4 Jan 2008 09:32:12 +0000 (09:32 +0000)
src/http/ngx_http_request.c

index 0816cf92022f267edf8e5ae1fa56c3acba9f35e6..bb21b71b25a4fedaf3a94fd31aebd4321c1afd99 100644 (file)
@@ -490,6 +490,11 @@ ngx_http_ssl_handshake(ngx_event_t *rev)
             rc = ngx_ssl_handshake(c);
 
             if (rc == NGX_AGAIN) {
+
+                if (!rev->timer_set) {
+                    ngx_add_timer(rev, c->listening->post_accept_timeout);
+                }
+
                 c->ssl->handler = ngx_http_ssl_handshake_handler;
                 return;
             }