From ab3c0f9250f248b37aac9f79359a773f06baa831 Mon Sep 17 00:00:00 2001 From: Piotr Sikora Date: Mon, 3 Feb 2014 14:17:17 -0800 Subject: Use ngx_socket_errno where appropriate. Signed-off-by: Piotr Sikora --- src/http/ngx_http_request.c | 2 +- src/http/ngx_http_upstream.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/http') diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index 0bb1b8cde..5f2cf7d39 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -2707,7 +2707,7 @@ ngx_http_test_reading(ngx_http_request_t *r) if (getsockopt(c->fd, SOL_SOCKET, SO_ERROR, (void *) &err, &len) == -1) { - err = ngx_errno; + err = ngx_socket_errno; } goto closed; diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index 26b576441..41590eae9 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -1096,7 +1096,7 @@ ngx_http_upstream_check_broken_connection(ngx_http_request_t *r, if (getsockopt(c->fd, SOL_SOCKET, SO_ERROR, (void *) &err, &len) == -1) { - err = ngx_errno; + err = ngx_socket_errno; } if (err) { @@ -1977,7 +1977,7 @@ ngx_http_upstream_test_connect(ngx_connection_t *c) if (getsockopt(c->fd, SOL_SOCKET, SO_ERROR, (void *) &err, &len) == -1) { - err = ngx_errno; + err = ngx_socket_errno; } if (err) { -- cgit