diff options
| -rw-r--r-- | lib/libfetch/common.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c index dabc8c4b16b3..8ae51d37481b 100644 --- a/lib/libfetch/common.c +++ b/lib/libfetch/common.c @@ -681,6 +681,10 @@ fetch_connect(const char *host, int port, int af, int verbose) delta.tv_usec / 1000; } } + if (pfd.revents & POLLHUP) { + errno = ECONNREFUSED; + break; + } if (pfd.revents == POLLOUT) { /* connection established */ err = 0; |
