mirror of
https://github.com/nginx/nginx.git
synced 2025-01-21 13:53:08 -06:00
handle connect()'s EAGAIN on Linux
This commit is contained in:
parent
82911ceb0c
commit
58e9f22bfd
@ -139,11 +139,22 @@ ngx_event_connect_peer(ngx_peer_connection_t *pc)
|
|||||||
if (rc == -1) {
|
if (rc == -1) {
|
||||||
err = ngx_socket_errno;
|
err = ngx_socket_errno;
|
||||||
|
|
||||||
|
|
||||||
|
if (err != NGX_EINPROGRESS
|
||||||
|
#if (NGX_WIN32)
|
||||||
/* Winsock returns WSAEWOULDBLOCK (NGX_EAGAIN) */
|
/* Winsock returns WSAEWOULDBLOCK (NGX_EAGAIN) */
|
||||||
|
&& err != NGX_EAGAIN
|
||||||
if (err != NGX_EINPROGRESS && err != NGX_EAGAIN) {
|
#endif
|
||||||
|
)
|
||||||
|
{
|
||||||
if (err == NGX_ECONNREFUSED
|
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_ENETDOWN
|
||||||
|| err == NGX_ENETUNREACH
|
|| err == NGX_ENETUNREACH
|
||||||
|| err == NGX_EHOSTDOWN
|
|| err == NGX_EHOSTDOWN
|
||||||
|
Loading…
Reference in New Issue
Block a user