diff options
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp | 6 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/messaging/exceptions.cpp | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp b/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp index 68a8f85f82..d78269e440 100644 --- a/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp +++ b/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp @@ -399,10 +399,14 @@ void ConnectionContext::send(boost::shared_ptr<SessionContext> ssn, boost::share } wakeupDriver(); if (sync && delivery) { - while (!delivery->accepted()) { + while (!delivery->delivered()) { QPID_LOG(debug, "Waiting for confirmation..."); wait(ssn, snd);//wait until message has been confirmed } + if (delivery->rejected()) { + throw MessageRejected("Message was rejected by peer"); + } + } } diff --git a/qpid/cpp/src/qpid/messaging/exceptions.cpp b/qpid/cpp/src/qpid/messaging/exceptions.cpp index 5054fdc682..f7bf4aaee0 100644 --- a/qpid/cpp/src/qpid/messaging/exceptions.cpp +++ b/qpid/cpp/src/qpid/messaging/exceptions.cpp @@ -44,6 +44,7 @@ NoMessageAvailable::NoMessageAvailable() : FetchError("No message to fetch") {} SenderError::SenderError(const std::string& msg) : LinkError(msg) {} SendError::SendError(const std::string& msg) : SenderError(msg) {} +MessageRejected::MessageRejected(const std::string& msg) : SendError(msg) {} TargetCapacityExceeded::TargetCapacityExceeded(const std::string& msg) : SendError(msg) {} SessionError::SessionError(const std::string& msg) : MessagingException(msg) {} |
