diff options
author | UbitUmarov | 2017-05-29 03:41:09 +0100 |
---|---|---|
committer | UbitUmarov | 2017-05-29 03:41:09 +0100 |
commit | 7be6e16555a25177128f6767661387cdffe084cc (patch) | |
tree | 89aa3aa0a8761268618670a7c6337f1466b984ea /OpenSim/Framework/Util.cs | |
parent | mono is a total crap (diff) | |
download | opensim-SC-7be6e16555a25177128f6767661387cdffe084cc.zip opensim-SC-7be6e16555a25177128f6767661387cdffe084cc.tar.gz opensim-SC-7be6e16555a25177128f6767661387cdffe084cc.tar.bz2 opensim-SC-7be6e16555a25177128f6767661387cdffe084cc.tar.xz |
no.. still a fail
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-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 | ||