diff options
Diffstat (limited to 'cpp/src/IceGrid/Topics.cpp')
-rw-r--r-- | cpp/src/IceGrid/Topics.cpp | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/cpp/src/IceGrid/Topics.cpp b/cpp/src/IceGrid/Topics.cpp index 78bb60155c0..4f7a2b5e73e 100644 --- a/cpp/src/IceGrid/Topics.cpp +++ b/cpp/src/IceGrid/Topics.cpp @@ -52,20 +52,20 @@ public: _topic(topic), _observer(observer), _serial(serial) - { - } + { + } void ice_response() - { - _topic->subscribe(_observer, _serial); - } + { + _topic->subscribe(_observer, _serial); + } void ice_exception(const Ice::Exception&) - { - // Ignore - } + { + // Ignore + } private: @@ -90,9 +90,7 @@ void NodeObserverTopic::nodeUp(const NodeDynamicInfo& info, const Ice::Current& current) { Lock sync(*this); - _nodes.insert(make_pair(info.name, info)); - _publisher->nodeUp(info); } @@ -100,11 +98,11 @@ void NodeObserverTopic::nodeDown(const string& name, const Ice::Current&) { Lock sync(*this); - - assert(_nodes.find(name) != _nodes.end()); - _nodes.erase(name); - - _publisher->nodeDown(name); + if(_nodes.find(name) != _nodes.end()) + { + _nodes.erase(name); + _publisher->nodeDown(name); + } } |