comparison src/http/ngx_http_request.c @ 2653:567028e737cc stable-0.6

r2561 merge: ignore EINVAL from setsockopt() on Solaris
author Igor Sysoev <igor@sysoev.ru>
date Wed, 01 Apr 2009 16:42:09 +0000
parents 76add0af8e21
children 0ea35a84c72d
comparison
equal deleted inserted replaced
2652:2a06634cd7bf 2653:567028e737cc
2262 2262
2263 if (setsockopt(c->fd, IPPROTO_TCP, TCP_NODELAY, 2263 if (setsockopt(c->fd, IPPROTO_TCP, TCP_NODELAY,
2264 (const void *) &tcp_nodelay, sizeof(int)) 2264 (const void *) &tcp_nodelay, sizeof(int))
2265 == -1) 2265 == -1)
2266 { 2266 {
2267 #if (NGX_SOLARIS)
2268 /* Solaris returns EINVAL if a socket has been shut down */
2269 c->log_error = NGX_ERROR_IGNORE_EINVAL;
2270 #endif
2271
2267 ngx_connection_error(c, ngx_socket_errno, 2272 ngx_connection_error(c, ngx_socket_errno,
2268 "setsockopt(TCP_NODELAY) failed"); 2273 "setsockopt(TCP_NODELAY) failed");
2274
2275 c->log_error = NGX_ERROR_INFO;
2269 ngx_http_close_connection(c); 2276 ngx_http_close_connection(c);
2270 return; 2277 return;
2271 } 2278 }
2272 2279
2273 c->tcp_nodelay = NGX_TCP_NODELAY_SET; 2280 c->tcp_nodelay = NGX_TCP_NODELAY_SET;