Enhanced connection checking.