libubus: fix synchronous ubus_notify without waiting for a timeout
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
This commit is contained in:
parent
3b66d054cc
commit
460301e62d
1 changed files with 3 additions and 1 deletions
|
@ -285,8 +285,10 @@ int ubus_notify(struct ubus_context *ctx, struct ubus_object *obj,
|
|||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
if (timeout < 0)
|
||||
if (timeout < 0) {
|
||||
ubus_abort_request(ctx, &req.req);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return ubus_complete_request(ctx, &req.req, timeout);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue