diff options
author | Thomas White <taw@physics.org> | 2024-06-11 12:05:42 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2024-06-11 12:05:42 +0200 |
commit | a412af69ddab223001492e5909a1a43599860f4a (patch) | |
tree | 8e02f892e7fb996682aea7033d55fbdf5b0155c8 /src | |
parent | e95b5750c3abaa390dd2655782e2e39bdbd9072a (diff) |
indexamajig: Don't send acknowledgements unless --asapo-acks
Prevously, it disabled the resend timeout, but still sent the
acknowledgements.
Diffstat (limited to 'src')
-rw-r--r-- | src/im-asapo.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/im-asapo.c b/src/im-asapo.c index 6bcffe2f..35e95199 100644 --- a/src/im-asapo.c +++ b/src/im-asapo.c @@ -279,13 +279,15 @@ void *im_asapo_fetch(struct im_asapo *a, size_t *pdata_size, void im_asapo_finalise(struct im_asapo *a, uint64_t message_id) { - AsapoErrorHandle err = asapo_new_handle(); - asapo_consumer_acknowledge(a->consumer, a->group_id, message_id, - a->stream, &err); - if ( asapo_is_error(err) ) { - show_asapo_error("Couldn't acknowledge ASAP::O message", err); + if ( a->use_ack ) { + AsapoErrorHandle err = asapo_new_handle(); + asapo_consumer_acknowledge(a->consumer, a->group_id, message_id, + a->stream, &err); + if ( asapo_is_error(err) ) { + show_asapo_error("Couldn't acknowledge ASAP::O message", err); + } + asapo_free_handle(&err); } - asapo_free_handle(&err); } |