libubus: add socket EOF handling to ubus_complete_request()
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
This commit is contained in:
parent
04e644bcce
commit
635ada4251
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue