1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-25 23:21:33 +03:00

sd-rtnl: recv_message - don't fail on interrupt

We should just try again instead.
This commit is contained in:
Tom Gundersen 2014-12-29 01:49:06 +01:00
parent 2263bb9a92
commit 0b2bbbdf2f

View File

@ -1348,8 +1348,10 @@ static int socket_recv_message(int fd, struct iovec *iov, uint32_t *_group, bool
/* no data */
if (errno == ENOBUFS)
log_debug("rtnl: kernel receive buffer overrun");
else if (errno == EAGAIN)
log_debug("rtnl: no data in socket");
return (errno == EAGAIN) ? 0 : -errno;
return (errno == EAGAIN || errno == EINTR) ? 0 : -errno;
} else if (r == 0)
/* connection was closed by the kernel */
return -ECONNRESET;