summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-09-24 17:34:08 +0000
committerAlan Conway <aconway@apache.org>2008-09-24 17:34:08 +0000
commita2a56cf9a7483e165fb579d0b519b284d02009e3 (patch)
tree11264fc87ea6e54c54b476e245ad4ee9c83faaeb /cpp/src/qpid/client
parent30be110b6914959a1eaee4803ff8c1c9938db7bb (diff)
downloadqpid-python-a2a56cf9a7483e165fb579d0b519b284d02009e3.tar.gz
Cluster replicates session command sequence state and consumers to newcomers.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@698666 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client')
-rw-r--r--cpp/src/qpid/client/ConnectionHandler.cpp5
-rw-r--r--cpp/src/qpid/client/ConnectionHandler.h2
2 files changed, 5 insertions, 2 deletions
diff --git a/cpp/src/qpid/client/ConnectionHandler.cpp b/cpp/src/qpid/client/ConnectionHandler.cpp
index 22ebec76bf..0321c2e6aa 100644
--- a/cpp/src/qpid/client/ConnectionHandler.cpp
+++ b/cpp/src/qpid/client/ConnectionHandler.cpp
@@ -50,6 +50,9 @@ ConnectionHandler::ConnectionHandler(const ConnectionSettings& s, framing::Proto
ESTABLISHED.insert(FAILED);
ESTABLISHED.insert(CLOSED);
ESTABLISHED.insert(OPEN);
+
+ FINISHED.insert(FAILED);
+ FINISHED.insert(CLOSED);
}
void ConnectionHandler::incoming(AMQFrame& frame)
@@ -107,7 +110,7 @@ void ConnectionHandler::close()
case OPEN:
setState(CLOSING);
proxy.close(200, OK);
- waitFor(CLOSED);
+ waitFor(FINISHED);
break;
// Nothing to do for CLOSING, CLOSED, FAILED or NOT_STARTED
}
diff --git a/cpp/src/qpid/client/ConnectionHandler.h b/cpp/src/qpid/client/ConnectionHandler.h
index f8bd5e5d49..ffb612fae8 100644
--- a/cpp/src/qpid/client/ConnectionHandler.h
+++ b/cpp/src/qpid/client/ConnectionHandler.h
@@ -44,7 +44,7 @@ class ConnectionHandler : private StateManager,
{
typedef framing::AMQP_ClientOperations::ConnectionHandler ConnectionOperations;
enum STATES {NOT_STARTED, NEGOTIATING, OPENING, OPEN, CLOSING, CLOSED, FAILED};
- std::set<int> ESTABLISHED;
+ std::set<int> ESTABLISHED, FINISHED;
class Adapter : public framing::FrameHandler
{