Signed-off-by: Felix Fietkau <nbd@openwrt.org>
if (req->complete_cb)
req->complete_cb(req, status);
- if (!registered)
+ if (!registered) {
uloop_fd_delete(&ctx->sock);
+ if (ctx->stack_depth)
+ ctx->pending_timer.cb(&ctx->pending_timer);
+ }
+
return status;
}
memcpy(&pending->hdr, hdr, sizeof(*hdr) + blob_raw_len(ubus_msghdr_data(hdr)));
list_add(&pending->list, &ctx->pending);
- uloop_timeout_set(&ctx->pending_timer, 1);
+ if (ctx->sock.registered)
+ uloop_timeout_set(&ctx->pending_timer, 1);
}
void __hidden