diff options
Diffstat (limited to 'cpp/src/qpid/cluster/Connection.cpp')
-rw-r--r-- | cpp/src/qpid/cluster/Connection.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cpp/src/qpid/cluster/Connection.cpp b/cpp/src/qpid/cluster/Connection.cpp index 923d66ad34..e76cebf68d 100644 --- a/cpp/src/qpid/cluster/Connection.cpp +++ b/cpp/src/qpid/cluster/Connection.cpp @@ -257,7 +257,7 @@ void Connection::closed() { close(); cluster.updateInClosed(); } - else if (catchUp) { + else if (catchUp && cluster.isExpectingUpdate()) { QPID_LOG(critical, cluster << " catch-up connection closed prematurely " << *this); cluster.leave(); } @@ -304,6 +304,10 @@ size_t Connection::decode(const char* data, size_t size) { const char* ptr = data; const char* end = data + size; if (catchUp) { // Handle catch-up locally. + if (!cluster.isExpectingUpdate()) { + QPID_LOG(error, "Rejecting unexpected catch-up connection."); + abort(); // Cluster is not expecting catch-up connections. + } bool wasOpen = connection->isOpen(); Buffer buf(const_cast<char*>(ptr), size); ptr += size; |