Invokes connectors' close method before shutdown the agent