diff options
author | Benoit Foucher <benoit@zeroc.com> | 2015-06-16 16:09:27 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2015-06-16 16:09:27 +0200 |
commit | 37d5c08ef459ac68933a3245931f480fe7619e4a (patch) | |
tree | 33b41ccbcb5fb035b96bbd1a9e2d0ec0442892b3 /cpp/src/IceGrid/ServerCache.cpp | |
parent | Fixed ICE-6595, potential deadlock when joining thread (diff) | |
download | ice-37d5c08ef459ac68933a3245931f480fe7619e4a.tar.bz2 ice-37d5c08ef459ac68933a3245931f480fe7619e4a.tar.xz ice-37d5c08ef459ac68933a3245931f480fe7619e4a.zip |
Fixed ICE-6594: IceGrid/replication test failure
Diffstat (limited to 'cpp/src/IceGrid/ServerCache.cpp')
-rw-r--r-- | cpp/src/IceGrid/ServerCache.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/cpp/src/IceGrid/ServerCache.cpp b/cpp/src/IceGrid/ServerCache.cpp index d6a320b68eb..4d998e9ab17 100644 --- a/cpp/src/IceGrid/ServerCache.cpp +++ b/cpp/src/IceGrid/ServerCache.cpp @@ -133,12 +133,15 @@ ServerEntryPtr ServerCache::add(const ServerInfo& info) { Lock sync(*this); - assert(!getImpl(info.descriptor->id)); - - ServerEntryPtr entry = new ServerEntry(*this, info.descriptor->id); - addImpl(info.descriptor->id, entry); + ServerEntryPtr entry = getImpl(info.descriptor->id); + if(!entry) + { + entry = new ServerEntry(*this, info.descriptor->id); + addImpl(info.descriptor->id, entry); + } entry->update(info, false); + _nodeCache.get(info.node, true)->addServer(entry); forEachCommunicator(AddCommunicator(*this, entry, info.application))(info.descriptor); |