[SPARK-3106] Fix the race condition issue about Connection and ConnectionManager

Not sure I understand what the comment is trying to say.