Automated cherry pick of #88079: Set up connection onClose prior to adding to connection map Kubernetes-commit: 8636cd89bc7abbf70b5939b5fd6833ac942b7894