summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/Connection.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2009-06-17 20:45:52 +0000
committerAlan Conway <aconway@apache.org>2009-06-17 20:45:52 +0000
commitebf8ccf7bb8c5d7111b04a76c9b5bc9c8e0c6327 (patch)
tree87b6a353376fd798bdc032e8fc205e8042c99a05 /cpp/src/qpid/cluster/Connection.cpp
parent00cefc5c8dc3eac268a39141254aea5e6f1ab8e7 (diff)
downloadqpid-python-ebf8ccf7bb8c5d7111b04a76c9b5bc9c8e0c6327.tar.gz
Handle invalid AMPQ data to a cluster by closing the offending connection.
Prior to this fix, invalid data shut down the whole cluster. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@785788 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/Connection.cpp')
-rw-r--r--cpp/src/qpid/cluster/Connection.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/cpp/src/qpid/cluster/Connection.cpp b/cpp/src/qpid/cluster/Connection.cpp
index e7dac82159..2db8879eb5 100644
--- a/cpp/src/qpid/cluster/Connection.cpp
+++ b/cpp/src/qpid/cluster/Connection.cpp
@@ -198,6 +198,12 @@ void Connection::deliverClose () {
cluster.erase(self);
}
+// The connection has been killed for misbehaving
+void Connection::abort() {
+ connection.abort();
+ cluster.erase(self);
+}
+
// Member of a shadow connection left the cluster.
void Connection::left() {
assert(isShadow());