fix a mistake with realloc_ctx: it needs to update the invoke flag in the async ctx structure