Add a comment saying that it is important to not mark the client as "complete" since this causes a race condition between seeing the failed state and the closed state.