[PATCH 1/4] server: Introduce async_terminated() helper to compute the 'terminated' flag.