From 3de263a28e2421bb916e1da0cf0f09881801785c Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 4 Feb 2009 21:31:23 +0000 Subject: Fix race condition with deleted local connections. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@740900 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/cluster/ConnectionMap.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cpp/src/qpid/cluster/ConnectionMap.cpp') diff --git a/cpp/src/qpid/cluster/ConnectionMap.cpp b/cpp/src/qpid/cluster/ConnectionMap.cpp index 9dc6210666..1a49a4d663 100644 --- a/cpp/src/qpid/cluster/ConnectionMap.cpp +++ b/cpp/src/qpid/cluster/ConnectionMap.cpp @@ -48,7 +48,9 @@ void ConnectionMap::erase(const ConnectionId& id) { ConnectionMap::ConnectionPtr ConnectionMap::get(const ConnectionId& id) { Map::const_iterator i = map.find(id); if (i == map.end()) { - assert(id.getMember() != cluster.getId()); + // Deleted local connection. + if(id.getMember() == cluster.getId()) + return 0; // New remote connection, create a shadow. std::ostringstream mgmtId; mgmtId << id; -- cgit v1.2.1