protected function getServersFromDns()
    {
        $servers = $this->dns->getRecord(LdapUtilities::SRV_PREFIX.$this->config->getDomainName(), DNS_SRV);

        if ($servers === false || empty($servers)) {
            throw new LdapConnectionException(sprintf(
                'No LDAP servers found via DNS for "%s".',
                $this->config->getDomainName()
            ));
        }
        array_multisort(
            array_column($servers, 'pri'), SORT_ASC|SORT_NUMERIC,
            array_column($servers, 'weight'), SORT_DESC|SORT_NUMERIC,
            $servers
        );

        return array_column($servers, 'target');
    }