libubus: add socket EOF handling to ubus_complete_request()

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
This commit is contained in:
Felix Fietkau 2015-12-09 18:35:07 +01:00
parent 04e644bcce
commit 635ada4251

View file

@ -160,6 +160,10 @@ int ubus_complete_request(struct ubus_context *ctx, struct ubus_request *req,
ubus_poll_data(ctx, (unsigned int) timeout);
uloop_cancelled = cancelled;
if (ctx->sock.eof) {
ubus_set_req_status(req, UBUS_STATUS_CONNECTION_FAILED);
break;
}
}
ctx->stack_depth--;
if (ctx->stack_depth)