mirror of
https://github.com/nginx/nginx.git
synced 2024-12-01 03:17:17 +08:00
r2118 merge:
handle connect()'s EAGAIN on Linux
This commit is contained in:
parent
6671983d86
commit
0c937d251f
@ -139,11 +139,22 @@ ngx_event_connect_peer(ngx_peer_connection_t *pc)
|
||||
if (rc == -1) {
|
||||
err = ngx_socket_errno;
|
||||
|
||||
/* Winsock returns WSAEWOULDBLOCK (NGX_EAGAIN) */
|
||||
|
||||
if (err != NGX_EINPROGRESS && err != NGX_EAGAIN) {
|
||||
|
||||
if (err != NGX_EINPROGRESS
|
||||
#if (NGX_WIN32)
|
||||
/* Winsock returns WSAEWOULDBLOCK (NGX_EAGAIN) */
|
||||
&& err != NGX_EAGAIN
|
||||
#endif
|
||||
)
|
||||
{
|
||||
if (err == NGX_ECONNREFUSED
|
||||
#if (NGX_LINUX)
|
||||
/*
|
||||
* Linux returns EAGAIN instead of ECONNREFUSED
|
||||
* for unix sockets if listen queue is full
|
||||
*/
|
||||
|| err == NGX_EAGAIN
|
||||
#endif
|
||||
|| err == NGX_ENETDOWN
|
||||
|| err == NGX_ENETUNREACH
|
||||
|| err == NGX_EHOSTDOWN
|
||||
|
Loading…
Reference in New Issue
Block a user