commit c11931eba21ec6ce522b103d25d26342c886581d parent b72d44bd6010657d49646ff10ffc3dc6f7740ae6 Author: Christian Grothoff <christian@grothoff.org> Date: Fri, 9 Oct 2026 22:45:49 +0200 cancel pending /keys requests when failing with error early Diffstat:
| M | src/backend/taler-merchant-httpd_post-orders-ORDER_ID-pay.c | | | 13 | +++++++++++++ |
1 file changed, 13 insertions(+), 0 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_post-orders-ORDER_ID-pay.c b/src/backend/taler-merchant-httpd_post-orders-ORDER_ID-pay.c @@ -1987,6 +1987,19 @@ phase_batch_deposits (struct PayContext *pc) if (NULL == eg->fo) { GNUNET_break_op (0); + /* We reply without suspending: the /keys lookups already started + for other exchanges must not call back into this request. */ + for (unsigned int j = 0; j<i; j++) + { + struct ExchangeGroup *egj = pc->parse_pay.egs[j]; + + if (NULL == egj->fo) + continue; + TMH_EXCHANGES_keys4exchange_cancel (egj->fo); + egj->fo = NULL; + pc->batch_deposits.pending_at_eg--; + } + GNUNET_assert (0 == pc->batch_deposits.pending_at_eg); pay_end (pc, TALER_MHD_reply_with_error ( pc->connection,