libubus: do not abort recv_retry before completing a message
authorFelix Fietkau <nbd@nbd.name>
Tue, 16 Apr 2019 08:34:45 +0000 (10:34 +0200)
committerFelix Fietkau <nbd@nbd.name>
Tue, 16 Apr 2019 08:34:46 +0000 (10:34 +0200)
If the header is read but not the remainder of the message, the stream
will be out of sync and parsing of future messages won't work

Signed-off-by: Felix Fietkau <nbd@nbd.name>
libubus-io.c

index daa710677880c1d5933b45ab9b528116c5f320ca..887e88c1b48b30a7c0a8d456dd022059c8aace2e 100644 (file)
@@ -192,8 +192,6 @@ static int recv_retry(struct ubus_context *ctx, struct iovec *iov, bool wait, in
 
                if (bytes < 0) {
                        bytes = 0;
-                       if (uloop_cancelling() || ctx->cancel_poll)
-                               return 0;
                        if (errno == EINTR)
                                continue;