If a DNS resolution fails on an outbound request, simply allow it

melanie
Melanie Thielker 2017-03-31 14:44:22 +01:00
parent 59f7cf79c9
commit 6463ab7d79
1 changed files with 12 additions and 2 deletions

View File

@ -212,7 +212,17 @@ namespace OpenSim.Framework
// Check that we are permitted to make calls to this endpoint. // Check that we are permitted to make calls to this endpoint.
bool foundIpv4Address = false; bool foundIpv4Address = false;
IPAddress[] addresses = Dns.GetHostAddresses(url.Host); IPAddress[] addresses = null;
try
{
addresses = Dns.GetHostAddresses(url.Host);
}
catch
{
// If there is a DNS error, we can't stop the script!
return true;
}
foreach (IPAddress addr in addresses) foreach (IPAddress addr in addresses)
{ {