diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-12-09 18:35:07 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-12-09 18:35:07 +0100 |
commit | 635ada42517f2fd79663a2a45f07c9461f6d20bc (patch) | |
tree | 5ba5ddc689eb12b95983e07054db8ea46a96c925 /libubus-req.c | |
parent | 04e644bcce3207df6992cbc36598afc4abf871b1 (diff) | |
download | ubus-635ada42517f2fd79663a2a45f07c9461f6d20bc.tar.gz |
libubus: add socket EOF handling to ubus_complete_request()
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'libubus-req.c')
-rw-r--r-- | libubus-req.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libubus-req.c b/libubus-req.c index bf19f36..416adab 100644 --- a/libubus-req.c +++ b/libubus-req.c @@ -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) |