From 8eed7099883eaa30bfa9310437c4de7a51941ff7 Mon Sep 17 00:00:00 2001 From: Emiel Bruijntjes Date: Wed, 21 Nov 2018 13:56:44 +0100 Subject: [PATCH] Connection::fail() will now also call the channel::onError method --- include/amqpcpp/channelimpl.h | 2 +- src/connectionimpl.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/amqpcpp/channelimpl.h b/include/amqpcpp/channelimpl.h index 0385af3..02e4d1b 100644 --- a/include/amqpcpp/channelimpl.h +++ b/include/amqpcpp/channelimpl.h @@ -623,7 +623,7 @@ public: // all later deferred objects should report an error, because it // was not possible to complete the instruction as the channel is - // now closed + // now closed (but the channel onError does not have to run) reportError("Channel has been closed", false); // done diff --git a/src/connectionimpl.cpp b/src/connectionimpl.cpp index 7b91dcd..bc06c4d 100644 --- a/src/connectionimpl.cpp +++ b/src/connectionimpl.cpp @@ -192,7 +192,7 @@ bool ConnectionImpl::fail(const Monitor &monitor, const char *message) while (!_channels.empty()) { // report the errors - _channels.begin()->second->reportError(message, false); + _channels.begin()->second->reportError(message); // leap out if no longer valid if (!monitor.valid()) return false;