Make sure AgentServer actually executes shutDown