ubusd: retry write on EINTR
authorFelix Fietkau <[email protected]>
Tue, 1 Jul 2025 18:32:40 +0000 (20:32 +0200)
committerFelix Fietkau <[email protected]>
Tue, 1 Jul 2025 18:32:40 +0000 (20:32 +0200)
Signed-off-by: Felix Fietkau <[email protected]>
ubusd_main.c

index 46066f457bc4780368f5b11a0bfc9355c99f162e..8422d6398ecce82124efff872eda06a079f3b045 100644 (file)
@@ -83,10 +83,12 @@ static void client_cb(struct uloop_fd *sock, unsigned int events)
                ssize_t written;
 
                ub = ubl->msg;
+retry_writev:
                written = ubus_msg_writev(sock->fd, ub, cl->txq_ofs);
                if (written < 0) {
                        switch(errno) {
                        case EINTR:
+                               goto retry_writev;
                        case EAGAIN:
                        case EACCES:
                                break;