diff options
author | Benoit Foucher <benoit@zeroc.com> | 2019-09-06 15:43:45 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2019-09-06 15:44:35 +0200 |
commit | 550ae394d7e3f69f89684284859aa905f99789f1 (patch) | |
tree | d51935b04bb57cd4076450876be608f2b8c8b46a /cpp/src/IceGrid/Database.cpp | |
parent | NetworkProxy warnings running with python_d - Close #443 (diff) | |
download | ice-550ae394d7e3f69f89684284859aa905f99789f1.tar.bz2 ice-550ae394d7e3f69f89684284859aa905f99789f1.tar.xz ice-550ae394d7e3f69f89684284859aa905f99789f1.zip |
Fixed IceGrid locking issue, fixes #503
Diffstat (limited to 'cpp/src/IceGrid/Database.cpp')
-rw-r--r-- | cpp/src/IceGrid/Database.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cpp/src/IceGrid/Database.cpp b/cpp/src/IceGrid/Database.cpp index 300865cf469..4abfe9e436d 100644 --- a/cpp/src/IceGrid/Database.cpp +++ b/cpp/src/IceGrid/Database.cpp @@ -1262,14 +1262,19 @@ Database::getAdapterInfo(const string& id) // server, if that's the case we get the adapter proxy from the // server. // + GetAdapterInfoResultPtr result; try { Lock sync(*this); // Make sure this isn't call during an update. - return _adapterCache.get(id)->getAdapterInfo(); + result = _adapterCache.get(id)->getAdapterInfoAsync(); } catch(const AdapterNotExistException&) { } + if(result) + { + return result->get(); // Don't hold the database lock while waiting for the endpoints + } // // Otherwise, we check the adapter endpoint table -- if there's an @@ -1314,7 +1319,7 @@ Database::getFilteredAdapterInfo(const string& id, const Ice::ConnectionPtr& con Lock sync(*this); // Make sure this isn't call during an update. AdapterEntryPtr entry = _adapterCache.get(id); - infos = entry->getAdapterInfo(); + infos = entry->getAdapterInfoNoEndpoints(); replicaGroup = ReplicaGroupEntryPtr::dynamicCast(entry); } if(replicaGroup) |