This is an automated email from the ASF dual-hosted git repository.
astitcher pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git
The following commit(s) were added to refs/heads/main by this push:
new 058e2928d PROTON-2183: [cpp] Fix aborted messages exception.
058e2928d is described below
commit 058e2928dad9d016fe14a8b6690547e39cdfd0fd
Author: Rakhi Kumari <[email protected]>
AuthorDate: Tue Feb 14 18:33:19 2023 +0530
PROTON-2183: [cpp] Fix aborted messages exception.
Handled the pn_ delivery_abort case.
---
cpp/src/messaging_adapter.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/cpp/src/messaging_adapter.cpp b/cpp/src/messaging_adapter.cpp
index 84624f2aa..9eea6645f 100644
--- a/cpp/src/messaging_adapter.cpp
+++ b/cpp/src/messaging_adapter.cpp
@@ -118,7 +118,12 @@ void on_delivery(messaging_handler& handler, pn_event_t*
event) {
if (pn_link_is_receiver(lnk)) {
delivery d(make_wrapper<delivery>(dlv));
- if (!pn_delivery_partial(dlv) && pn_delivery_readable(dlv)) {
+ if (pn_delivery_aborted(dlv)) {
+ pn_delivery_settle(dlv);
+ pn_link_flow(lnk, 1);
+ pn_link_advance(lnk);
+ }
+ else if (!pn_delivery_partial(dlv) && pn_delivery_readable(dlv)) {
// generate on_message
pn_connection_t *pnc = pn_session_connection(pn_link_session(lnk));
connection_context& ctx = connection_context::get(pnc);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]