diff options
author | Benoit Foucher <benoit@zeroc.com> | 2018-02-16 12:36:36 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2018-02-16 12:36:36 +0100 |
commit | 1d9509c347547b2d36d6fa3ff667927836d72245 (patch) | |
tree | df6cc4ac9d1e2742ae8d9bf36a4f7927e7f970c1 /cpp/src/Ice/ConnectionFactory.cpp | |
parent | Allow to create NuGet packages with single platform/configuration (diff) | |
download | ice-1d9509c347547b2d36d6fa3ff667927836d72245.tar.bz2 ice-1d9509c347547b2d36d6fa3ff667927836d72245.tar.xz ice-1d9509c347547b2d36d6fa3ff667927836d72245.zip |
Improved object adapter getPublishedEndpoints/refreshPublishedEndpoints method
to return the Ice router server endpoints if the adapter is associated with a
router.
setPublishedEndpoints now also raises an invalid argument exception for such
adapters.
Also fixed a rare deadlock that could occur on adapter creating if the router
wasn't accessible.
Fixes ICE-8675 and ICE-8650
Diffstat (limited to 'cpp/src/Ice/ConnectionFactory.cpp')
-rw-r--r-- | cpp/src/Ice/ConnectionFactory.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cpp/src/Ice/ConnectionFactory.cpp b/cpp/src/Ice/ConnectionFactory.cpp index 955c661bfb9..9652a253ff9 100644 --- a/cpp/src/Ice/ConnectionFactory.cpp +++ b/cpp/src/Ice/ConnectionFactory.cpp @@ -271,6 +271,10 @@ IceInternal::OutgoingConnectionFactory::create(const vector<EndpointIPtr>& endpt void IceInternal::OutgoingConnectionFactory::setRouterInfo(const RouterInfoPtr& routerInfo) { + assert(routerInfo); + ObjectAdapterPtr adapter = routerInfo->getAdapter(); + vector<EndpointIPtr> endpoints = routerInfo->getClientEndpoints(); // Must be called outside the synchronization + IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); if(_destroyed) @@ -278,7 +282,6 @@ IceInternal::OutgoingConnectionFactory::setRouterInfo(const RouterInfoPtr& route throw CommunicatorDestroyedException(__FILE__, __LINE__); } - assert(routerInfo); // // Search for connections to the router's client proxy endpoints, @@ -286,8 +289,6 @@ IceInternal::OutgoingConnectionFactory::setRouterInfo(const RouterInfoPtr& route // callbacks from the router can be received over such // connections. // - ObjectAdapterPtr adapter = routerInfo->getAdapter(); - vector<EndpointIPtr> endpoints = routerInfo->getClientEndpoints(); for(vector<EndpointIPtr>::const_iterator p = endpoints.begin(); p != endpoints.end(); ++p) { EndpointIPtr endpoint = *p; |