comparison src/core/ngx_connection.c @ 2774:baad3036086e

Winsock uses ECONNABORTED instead of ECONNRESET
author Igor Sysoev <igor@sysoev.ru>
date Wed, 29 Apr 2009 11:34:58 +0000
parents d43d73277c5c
children 01c691e31032
comparison
equal deleted inserted replaced
2773:7a44b1932741 2774:baad3036086e
799 ngx_int_t 799 ngx_int_t
800 ngx_connection_error(ngx_connection_t *c, ngx_err_t err, char *text) 800 ngx_connection_error(ngx_connection_t *c, ngx_err_t err, char *text)
801 { 801 {
802 ngx_uint_t level; 802 ngx_uint_t level;
803 803
804 if (err == NGX_ECONNRESET && c->log_error == NGX_ERROR_IGNORE_ECONNRESET) { 804 #if (NGX_WIN32)
805
806 /* Winsock returns NGX_ECONNABORTED instead of NGX_ECONNRESET */
807
808 if (err == NGX_ECONNABORTED
809 #else
810 if (err == NGX_ECONNRESET
811 #endif
812 && c->log_error == NGX_ERROR_IGNORE_ECONNRESET)
813 {
805 return 0; 814 return 0;
806 } 815 }
807 816
808 #if (NGX_SOLARIS) 817 #if (NGX_SOLARIS)
809 if (err == NGX_EINVAL && c->log_error == NGX_ERROR_IGNORE_EINVAL) { 818 if (err == NGX_EINVAL && c->log_error == NGX_ERROR_IGNORE_EINVAL) {
811 } 820 }
812 #endif 821 #endif
813 822
814 if (err == 0 823 if (err == 0
815 || err == NGX_ECONNRESET 824 || err == NGX_ECONNRESET
816 #if !(NGX_WIN32) 825 #if (NGX_WIN32)
826 || err == NGX_ECONNABORTED
827 #else
817 || err == NGX_EPIPE 828 || err == NGX_EPIPE
818 #endif 829 #endif
819 || err == NGX_ENOTCONN 830 || err == NGX_ENOTCONN
820 || err == NGX_ETIMEDOUT 831 || err == NGX_ETIMEDOUT
821 || err == NGX_ECONNREFUSED 832 || err == NGX_ECONNREFUSED