summaryrefslogtreecommitdiff
path: root/source3/lib/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r--source3/lib/util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 0ed08405ba..831d7d64e0 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -2905,7 +2905,9 @@ int open_socket_out(int type, struct in_addr *addr, int port ,int timeout)
connect_again:
ret = connect(res,(struct sockaddr *)&sock_out,sizeof(sock_out));
- if (ret < 0 && (errno == EINPROGRESS || errno == EALREADY) && loops--) {
+ /* Some systems return EAGAIN when they mean EINPROGRESS */
+ if (ret < 0 && (errno == EINPROGRESS || errno == EALREADY ||
+ errno == EAGAIN) && loops--) {
msleep(connect_loop);
goto connect_again;
}