summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/UdpEndpointI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/UdpEndpointI.cpp')
-rw-r--r--cpp/src/Ice/UdpEndpointI.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/cpp/src/Ice/UdpEndpointI.cpp b/cpp/src/Ice/UdpEndpointI.cpp
index 6681e8becbf..0eef033dd06 100644
--- a/cpp/src/Ice/UdpEndpointI.cpp
+++ b/cpp/src/Ice/UdpEndpointI.cpp
@@ -492,7 +492,27 @@ IceInternal::UdpEndpointI::expand(bool server) const
}
else
{
- endps.push_back(const_cast<UdpEndpointI*>(this));
+ if(!server)
+ {
+
+ vector<string> hosts = getHosts(_host);
+ if(hosts.size() > 1)
+ {
+ for(unsigned int i = 0; i < hosts.size(); ++i)
+ {
+ endps.push_back(
+ new UdpEndpointI(_instance, hosts[i], _port, _connect, _connectionId, _compress, true));
+ }
+ }
+ else
+ {
+ endps.push_back(const_cast<UdpEndpointI*>(this));
+ }
+ }
+ else
+ {
+ endps.push_back(const_cast<UdpEndpointI*>(this));
+ }
}
return endps;
}