comparison src/core/ngx_connection.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 2e91aecb9e57
children c352c419be85
comparison
equal deleted inserted replaced
2559:774391e44941 2560:a7443674e429
780 ngx_int_t 780 ngx_int_t
781 ngx_connection_error(ngx_connection_t *c, ngx_err_t err, char *text) 781 ngx_connection_error(ngx_connection_t *c, ngx_err_t err, char *text)
782 { 782 {
783 ngx_uint_t level; 783 ngx_uint_t level;
784 784
785 if (err == NGX_ECONNRESET 785 if (err == NGX_ECONNRESET && c->log_error == NGX_ERROR_IGNORE_ECONNRESET) {
786 && c->log_error == NGX_ERROR_IGNORE_ECONNRESET)
787 {
788 return 0; 786 return 0;
789 } 787 }
788
789 #if (NGX_SOLARIS)
790 if (err == NGX_EINVAL && c->log_error == NGX_ERROR_IGNORE_EINVAL) {
791 return 0;
792 }
793 #endif
790 794
791 if (err == 0 795 if (err == 0
792 || err == NGX_ECONNRESET 796 || err == NGX_ECONNRESET
793 #if !(NGX_WIN32) 797 #if !(NGX_WIN32)
794 || err == NGX_EPIPE 798 || err == NGX_EPIPE
801 || err == NGX_EHOSTDOWN 805 || err == NGX_EHOSTDOWN
802 || err == NGX_EHOSTUNREACH) 806 || err == NGX_EHOSTUNREACH)
803 { 807 {
804 switch (c->log_error) { 808 switch (c->log_error) {
805 809
810 case NGX_ERROR_IGNORE_EINVAL:
806 case NGX_ERROR_IGNORE_ECONNRESET: 811 case NGX_ERROR_IGNORE_ECONNRESET:
807 case NGX_ERROR_INFO: 812 case NGX_ERROR_INFO:
808 level = NGX_LOG_INFO; 813 level = NGX_LOG_INFO;
809 break; 814 break;
810 815