From 222c9f23bc6ac15d8f6fde530322b8f050e73bf3 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Wed, 1 Apr 2009 16:42:09 +0000 Subject: r2561 merge: ignore EINVAL from setsockopt() on Solaris --- src/http/ngx_http_request.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/http/ngx_http_request.c') diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index bcfe21bbc..f7c2ffa46 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -2264,8 +2264,15 @@ ngx_http_set_keepalive(ngx_http_request_t *r) (const void *) &tcp_nodelay, sizeof(int)) == -1) { +#if (NGX_SOLARIS) + /* Solaris returns EINVAL if a socket has been shut down */ + c->log_error = NGX_ERROR_IGNORE_EINVAL; +#endif + ngx_connection_error(c, ngx_socket_errno, "setsockopt(TCP_NODELAY) failed"); + + c->log_error = NGX_ERROR_INFO; ngx_http_close_connection(c); return; } -- cgit