Mercurial > hg > nginx
diff src/http/ngx_http_request.c @ 2560:a7443674e429
ignore EINVAL from setsockopt() on Solaris
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 12 Mar 2009 07:16:15 +0000 |
parents | 8ec97ff12a0a |
children | 2c3cff5999a2 |
line wrap: on
line diff
--- 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_ (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; }