fix SIGINT handling
[project/ubus.git] / libubus.c
index 66de478..8749d7c 100644 (file)
--- a/libubus.c
+++ b/libubus.c
@@ -124,6 +124,8 @@ static bool recv_retry(int fd, struct iovec *iov, bool wait)
                bytes = read(fd, iov->iov_base, iov->iov_len);
                if (bytes < 0) {
                        bytes = 0;
+                       if (uloop_cancelled)
+                               return false;
                        if (errno == EINTR)
                                continue;