From 37d5c08ef459ac68933a3245931f480fe7619e4a Mon Sep 17 00:00:00 2001 From: Benoit Foucher Date: Tue, 16 Jun 2015 16:09:27 +0200 Subject: Fixed ICE-6594: IceGrid/replication test failure --- cpp/src/IceGrid/ServerCache.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'cpp/src/IceGrid/ServerCache.cpp') 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); -- cgit v1.2.3