def METHOD_NAME(self):
    # type: () -> None
    if self.ipv4_only:
        _, _, ipv4_list = socket.gethostbyname_ex(self.host)
        self._addrs = [AddrTuple(ipv4_addr, socket.AF_INET) for ipv4_addr in ipv4_list]
    else:
        self._addrs = [
            AddrTuple(sockaddr[0], socket_type)
            for (socket_type, _, _, _, sockaddr) in socket.getaddrinfo(
                self.host, self.port, 0, 0, socket.IPPROTO_TCP
            )
        ]
    if not self.multiple_ips:
        self._addrs = self._addrs[:1]
    if self._addrs == []:
        raise Exception("No IPs attached to host")
    self.log.debug(
        "%s resolved to %s. Socket type: %s", self.host, self._addrs[0].address, self._addrs[0].socket_type
    )