aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Util.cs16
1 files changed, 15 insertions, 1 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index a184f89..ac1145f 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -43,6 +43,8 @@ namespace OpenSim.Framework
43{ 43{
44 public class Util 44 public class Util
45 { 45 {
46 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
47
46 private static Random randomClass = new Random(); 48 private static Random randomClass = new Random();
47 private static uint nextXferID = 5000; 49 private static uint nextXferID = 5000;
48 private static object XferLock = new object(); 50 private static object XferLock = new object();
@@ -327,8 +329,20 @@ namespace OpenSim.Framework
327 if (IPAddress.TryParse(dnsAddress, out ipa)) 329 if (IPAddress.TryParse(dnsAddress, out ipa))
328 return ipa; 330 return ipa;
329 331
332 IPAddress[] hosts = null;
333
330 // Not an IP, lookup required 334 // Not an IP, lookup required
331 IPAddress[] hosts = Dns.GetHostEntry(dnsAddress).AddressList; 335 try
336 {
337 hosts = Dns.GetHostEntry(dnsAddress).AddressList;
338 }
339 catch (Exception e)
340 {
341 m_log.ErrorFormat("[UTIL]: An error occurred while resolving {0}, {1}", dnsAddress, e);
342
343 // Still going to throw the exception on for now, since this was what was happening in the first place
344 throw e;
345 }
332 346
333 foreach (IPAddress host in hosts) 347 foreach (IPAddress host in hosts)
334 { 348 {