Mercurial > hg > nginx-quic
changeset 2774:baad3036086e
Winsock uses ECONNABORTED instead of ECONNRESET
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 29 Apr 2009 11:34:58 +0000 |
parents | 7a44b1932741 |
children | 01c691e31032 |
files | src/core/ngx_connection.c |
diffstat | 1 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/core/ngx_connection.c +++ b/src/core/ngx_connection.c @@ -801,7 +801,16 @@ ngx_connection_error(ngx_connection_t *c { ngx_uint_t level; - if (err == NGX_ECONNRESET && c->log_error == NGX_ERROR_IGNORE_ECONNRESET) { +#if (NGX_WIN32) + + /* Winsock returns NGX_ECONNABORTED instead of NGX_ECONNRESET */ + + if (err == NGX_ECONNABORTED +#else + if (err == NGX_ECONNRESET +#endif + && c->log_error == NGX_ERROR_IGNORE_ECONNRESET) + { return 0; } @@ -813,7 +822,9 @@ ngx_connection_error(ngx_connection_t *c if (err == 0 || err == NGX_ECONNRESET -#if !(NGX_WIN32) +#if (NGX_WIN32) + || err == NGX_ECONNABORTED +#else || err == NGX_EPIPE #endif || err == NGX_ENOTCONN