prevent connection attempt, if port list is empty.