Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

Commit 9783c1f

Browse files
authored
Merge pull request #5 from zenedge/feature/OPENRESTY-127_https_healthchecks_issue
OPENRESTY-127 HTTPS healthchecks issue
2 parents da50d14 + b91ba36 commit 9783c1f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ngx_http_upstream_check_module.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,6 +1226,9 @@ ngx_http_upstream_check_ssl_init(ngx_http_upstream_check_peer_t *peer,
12261226
return;
12271227

12281228
failed:
1229+
// Connection needs to be set to failed
1230+
// SSL handshake fail doesn't mean as failed connection, but in the healthcheck case it does
1231+
c->error = 1;
12291232
ngx_http_upstream_check_status_update(peer, 0);
12301233
ngx_http_upstream_check_clean_event(peer);
12311234
}
@@ -1243,6 +1246,9 @@ ngx_http_upstream_check_ssl_handshake(ngx_connection_t *c)
12431246
ngx_del_timer(c->read);
12441247

12451248
if (!c->ssl->handshaked) {
1249+
// Connection needs to be set to failed
1250+
// SSL handshake fail doesn't mean as failed connection, but in the healthcheck case it does
1251+
c->error = 1;
12461252
ngx_http_upstream_check_status_update(peer, 0);
12471253
ngx_http_upstream_check_clean_event(peer);
12481254
return;

0 commit comments

Comments
 (0)