Refined connection handling.