While POSIX document EINPROGRESS, Linux connect() system call returns
EAGAIN for nonblocking Unix sockets instead. This patch handles this
case by repeating connect() attempts.

Signed-off-by: Ihar Hrachyshka <ihrac...@redhat.com>
---
 lib/socket-util-unix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/socket-util-unix.c b/lib/socket-util-unix.c
index 230705ba3..44ec16bce 100644
--- a/lib/socket-util-unix.c
+++ b/lib/socket-util-unix.c
@@ -366,7 +366,7 @@ make_unix_socket(int style, bool nonblock,
                 if (!connect(fd, (struct sockaddr *)&un, un_len)) {
                     break;
                 }
-                if (errno != EINPROGRESS) {
+                if (errno != EAGAIN && errno != EINPROGRESS) {
                     error = errno;
                     break;
                 }
-- 
2.41.0

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to