Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usock.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/usock.c b/usock.c
index 0ce5390..15b6988 100644
--- a/usock.c
+++ b/usock.c
@@ -120,10 +120,7 @@ static int poll_restart(struct pollfd *fds, int nfds, int timeout)
while (1) {
ret = poll(fds, nfds, timeout);
- if (ret == EAGAIN)
- continue;
-
- if (ret != EINTR)
+ if (ret >= 0 || (errno != EINTR && errno != EAGAIN))
return ret;
clock_gettime(CLOCK_MONOTONIC, &cur);