Skip to content

Commit

Permalink
aqs: Only set already_acked_or_nacked after ack succeeded
Browse files Browse the repository at this point in the history
  • Loading branch information
svix-jplatte committed Aug 13, 2024
1 parent f498ce1 commit b07b93f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions omniqueue/src/backends/azure_queue_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,14 @@ impl Acker for AqsAcker {
if self.already_acked_or_nacked {
return Err(QueueError::CannotAckOrNackTwice);
}
self.already_acked_or_nacked = true;

self.client
.pop_receipt_client(self.pop_receipt.clone())
.delete()
.await
.map_err(QueueError::generic)
.map(|_| ())
.map_err(QueueError::generic)?;
self.already_acked_or_nacked = true;
Ok(())
}

async fn nack(&mut self) -> Result<()> {
Expand Down

0 comments on commit b07b93f

Please sign in to comment.