comparison 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
comparison
equal deleted inserted replaced
2559:774391e44941 2560:a7443674e429
2419 2419
2420 if (setsockopt(c->fd, IPPROTO_TCP, TCP_NODELAY, 2420 if (setsockopt(c->fd, IPPROTO_TCP, TCP_NODELAY,
2421 (const void *) &tcp_nodelay, sizeof(int)) 2421 (const void *) &tcp_nodelay, sizeof(int))
2422 == -1) 2422 == -1)
2423 { 2423 {
2424 #if (NGX_SOLARIS)
2425 /* Solaris returns EINVAL if a socket has been shut down */
2426 c->log_error = NGX_ERROR_IGNORE_EINVAL;
2427 #endif
2428
2424 ngx_connection_error(c, ngx_socket_errno, 2429 ngx_connection_error(c, ngx_socket_errno,
2425 "setsockopt(TCP_NODELAY) failed"); 2430 "setsockopt(TCP_NODELAY) failed");
2431
2432 c->log_error = NGX_ERROR_INFO;
2426 ngx_http_close_connection(c); 2433 ngx_http_close_connection(c);
2427 return; 2434 return;
2428 } 2435 }
2429 2436
2430 c->tcp_nodelay = NGX_TCP_NODELAY_SET; 2437 c->tcp_nodelay = NGX_TCP_NODELAY_SET;