summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-08-17 20:46:34 -0700
committerFlorin Coras <florin.coras@gmail.com>2020-08-18 14:34:01 +0000
commit587ea45ad84675cb62380c73c6f484cd6fce7934 (patch)
treed2a31b625e98d6efb565e2128deac1825de9ff13 /src
parent1060332e62d1216bf33c697d0a54ba35d4903eb3 (diff)
api: retry sending fd on EAGAIN
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I04117636ad95b706e3dd9331f00bd80e57d26d7f
Diffstat (limited to 'src')
-rw-r--r--src/vlibmemory/socket_api.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vlibmemory/socket_api.c b/src/vlibmemory/socket_api.c
index 566305ff7fc..a3a0c3b2eb9 100644
--- a/src/vlibmemory/socket_api.c
+++ b/src/vlibmemory/socket_api.c
@@ -541,7 +541,8 @@ vl_sock_api_send_fd_msg (int socket_fd, int fds[], int n_fds)
cmsg->cmsg_type = SCM_RIGHTS;
clib_memcpy_fast (CMSG_DATA (cmsg), fds, sizeof (int) * n_fds);
- rv = sendmsg (socket_fd, &mh, 0);
+ while ((rv = sendmsg (socket_fd, &mh, 0)) < 0 && errno == EAGAIN)
+ ;
if (rv < 0)
return clib_error_return_unix (0, "sendmsg");
return 0;