Add close to client for graceful exit.