diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-04-29 11:34:58 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-04-29 11:34:58 +0000 |
commit | dcc9205a39d6125988fb8a1fbed275fc389012f1 (patch) | |
tree | 7b187e560c55e58a9b8737883296eef6d1479d0a /src/core/ngx_connection.c | |
parent | 341b8f67b908a740bd0316f1f7dc1a97311513f0 (diff) | |
download | nginx-dcc9205a39d6125988fb8a1fbed275fc389012f1.tar.gz nginx-dcc9205a39d6125988fb8a1fbed275fc389012f1.zip |
Winsock uses ECONNABORTED instead of ECONNRESET
Diffstat (limited to 'src/core/ngx_connection.c')
-rw-r--r-- | src/core/ngx_connection.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/core/ngx_connection.c b/src/core/ngx_connection.c index ed9efe754..c5abb7be6 100644 --- a/src/core/ngx_connection.c +++ b/src/core/ngx_connection.c @@ -801,7 +801,16 @@ ngx_connection_error(ngx_connection_t *c, ngx_err_t err, char *text) { 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, ngx_err_t err, char *text) if (err == 0 || err == NGX_ECONNRESET -#if !(NGX_WIN32) +#if (NGX_WIN32) + || err == NGX_ECONNABORTED +#else || err == NGX_EPIPE #endif || err == NGX_ENOTCONN |