added a check to see if we reached the limit for number of times to attempt contacting a nameserver