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