aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/im-asapo.c14
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);
}