Handle 'Temporary failure in name resolution' gracefully when looking up hostnames to connect to