Welcome! Log In Create A New Profile

Advanced

[nginx] Upstream: SSL handshake timeouts.

Maxim Dounin
July 28, 2014 10:32AM
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;
}

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Upstream: SSL handshake timeouts.

Maxim Dounin 714 July 28, 2014 10:32AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 304
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready