diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Util.cs | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 3ddeafb..fe84498 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -1078,31 +1078,25 @@ namespace OpenSim.Framework | |||
1078 | 1078 | ||
1079 | // Reset for next check | 1079 | // Reset for next check |
1080 | ia = null; | 1080 | ia = null; |
1081 | #if (_MONO) | 1081 | try |
1082 | // mono is a TOTAL CRAP | ||
1083 | int retry = 3; | ||
1084 | while(ia == null && retry-- >= 0) | ||
1085 | #endif | ||
1086 | { | 1082 | { |
1087 | try | 1083 | foreach (IPAddress Adr in Dns.GetHostAddresses(hostname)) |
1088 | { | 1084 | { |
1089 | foreach (IPAddress Adr in Dns.GetHostAddresses(hostname)) | 1085 | if (ia == null) |
1090 | { | 1086 | ia = Adr; |
1091 | if (ia == null) | ||
1092 | ia = Adr; | ||
1093 | 1087 | ||
1094 | if (Adr.AddressFamily == AddressFamily.InterNetwork) | 1088 | if (Adr.AddressFamily == AddressFamily.InterNetwork) |
1095 | { | 1089 | { |
1096 | ia = Adr; | 1090 | ia = Adr; |
1097 | break; | 1091 | break; |
1098 | } | ||
1099 | } | 1092 | } |
1100 | } | 1093 | } |
1101 | catch // (SocketException e) | ||
1102 | { | ||
1103 | ia = null; | ||
1104 | } | ||
1105 | } | 1094 | } |
1095 | catch // (SocketException e) | ||
1096 | { | ||
1097 | ia = null; | ||
1098 | } | ||
1099 | |||
1106 | return getEndPoint(ia,port); | 1100 | return getEndPoint(ia,port); |
1107 | } | 1101 | } |
1108 | 1102 | ||