From fb5e0ff892735f65e013edc0f06a3f17d75070f8 Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Mon, 8 Mar 2021 23:11:53 -0500 Subject: [PATCH] [core] check EAGAIN if unix socket connect() delay --- src/gw_backend.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gw_backend.c b/src/gw_backend.c index 9844bde7..621b4691 100644 --- a/src/gw_backend.c +++ b/src/gw_backend.c @@ -978,7 +978,8 @@ static gw_host * gw_host_get(request_st * const r, gw_extension *extension, int static int gw_establish_connection(request_st * const r, gw_host *host, gw_proc *proc, pid_t pid, int gw_fd, int debug) { if (-1 == connect(gw_fd, proc->saddr, proc->saddrlen)) { - if (errno == EINPROGRESS || errno == EALREADY || errno == EINTR) { + if (errno == EINPROGRESS || errno == EALREADY || errno == EINTR + || (errno == EAGAIN && !buffer_string_is_empty(host->unixsocket))) { if (debug > 2) { log_error(r->conf.errh, __FILE__, __LINE__, "connect delayed; will continue later: %s",