On Fri, Jan 14, 2022 at 10:36 AM Pete Fawcett <[email protected]> wrote: > I tried this but it didn't, initially, fix the problem. > It turns out that the current exception handling is causing the link to be > closed from within Connection object doDeliveryUpdated > <https://github.com/apache/qpid-cpp/blob/main/src/qpid/broker/amqp/Connection.cpp#L675> > Calling Session::abort_pending() from there meant changing abort_pending() > to be a public function, which makes me wonder if it is the right thing to > be doing. > Making the change, and calling abort_pending() before closing the link in > doDeliveryUpdated, did remove the pending items and so prevent the Segfault.
You could also put a try/catch in Session::readable[1], and call abort_pending before rethrowing. (Or later, send back a nack for the message instead of rethrowing for certain errors). [1] https://github.com/apache/qpid-cpp/blob/main/src/qpid/broker/amqp/Session.cpp#L697 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
