diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2011-04-04 12:26:53 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2011-04-04 12:26:53 +0000 |
| commit | 4956ac510858c5bc32945bcb87a460b91440ad3e (patch) | |
| tree | c3692ef67e1a4fb4d10a4ab213c13844a34173ed /src/core/ngx_connection.h | |
| parent | fde7d51392598d0fa74dca125883d9663e7eb80a (diff) | |
| download | nginx-4956ac510858c5bc32945bcb87a460b91440ad3e.tar.gz nginx-4956ac510858c5bc32945bcb87a460b91440ad3e.tar.bz2 | |
reuse keepalive connections if there are no free worker connections
patch by Maxim Dounin
Diffstat (limited to 'src/core/ngx_connection.h')
| -rw-r--r-- | src/core/ngx_connection.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/ngx_connection.h b/src/core/ngx_connection.h index 3837fd255..f9bf50401 100644 --- a/src/core/ngx_connection.h +++ b/src/core/ngx_connection.h @@ -135,6 +135,8 @@ struct ngx_connection_s { ngx_buf_t *buffer; + ngx_queue_t queue; + ngx_atomic_uint_t number; ngx_uint_t requests; @@ -150,6 +152,7 @@ struct ngx_connection_s { unsigned destroyed:1; unsigned idle:1; + unsigned reusable:1; unsigned close:1; unsigned sendfile:1; @@ -186,5 +189,6 @@ ngx_int_t ngx_connection_error(ngx_connection_t *c, ngx_err_t err, char *text); ngx_connection_t *ngx_get_connection(ngx_socket_t s, ngx_log_t *log); void ngx_free_connection(ngx_connection_t *c); +void ngx_reusable_connection(ngx_connection_t *c, ngx_uint_t reusable); #endif /* _NGX_CONNECTION_H_INCLUDED_ */ |
