if (req->complete_cb)
req->complete_cb(req, status);
- if (!registered)
+ if (!registered) {
uloop_fd_delete(&ctx->sock);
- if (!ctx->stack_depth)
- ubus_process_pending_msg(ctx);
+ if (ctx->stack_depth)
+ ctx->pending_timer.cb(&ctx->pending_timer);
+ }
return status;
}