diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-03-12 07:16:15 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-03-12 07:16:15 +0000 |
commit | 0bd7b00eb7636ec79cf4000fb9db79cab42deed9 (patch) | |
tree | beeec95233b1fa15063ef0fea08e1a5d31d787c4 /src/http/ngx_http_request.c | |
parent | d9307664db28c32f055fb20ea479375d8645adae (diff) | |
download | nginx-0bd7b00eb7636ec79cf4000fb9db79cab42deed9.tar.gz nginx-0bd7b00eb7636ec79cf4000fb9db79cab42deed9.zip |
ignore EINVAL from setsockopt() on Solaris
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r-- | src/http/ngx_http_request.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index c018d6868..fbe088711 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -2421,8 +2421,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; } |