mirror of
				https://github.com/openresty/openresty.git
				synced 2024-10-13 00:29:41 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			37 lines
		
	
	
		
			1020 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			1020 B
		
	
	
	
		
			C
		
	
	
	
	
	
| details:   http://hg.nginx.org/nginx/rev/9bf58a3da25b
 | |
| branches:
 | |
| changeset: 5774:9bf58a3da25b
 | |
| user:      Maxim Dounin <mdounin@mdounin.ru>
 | |
| date:      Mon Jul 28 18:30:14 2014 +0400
 | |
| description:
 | |
| Upstream: SSL handshake timeouts.
 | |
| 
 | |
| Timeout may not be set on an upstream connection when we call
 | |
| ngx_ssl_handshake() in ngx_http_upstream_ssl_init_connection(),
 | |
| so make sure to arm it if it's not set.
 | |
| 
 | |
| Based on a patch by Yichun Zhang.
 | |
| 
 | |
| diffstat:
 | |
| 
 | |
|  src/http/ngx_http_upstream.c |  5 +++++
 | |
|  1 files changed, 5 insertions(+), 0 deletions(-)
 | |
| 
 | |
| diffs (15 lines):
 | |
| 
 | |
| diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
 | |
| --- a/src/http/ngx_http_upstream.c
 | |
| +++ b/src/http/ngx_http_upstream.c
 | |
| @@ -1393,6 +1393,11 @@ ngx_http_upstream_ssl_init_connection(ng
 | |
|      rc = ngx_ssl_handshake(c);
 | |
| 
 | |
|      if (rc == NGX_AGAIN) {
 | |
| +
 | |
| +        if (!c->write->timer_set) {
 | |
| +            ngx_add_timer(c->write, u->conf->connect_timeout);
 | |
| +        }
 | |
| +
 | |
|          c->ssl->handler = ngx_http_upstream_ssl_handshake;
 | |
|          return;
 | |
|      }
 |