Skip to content

Commit

Permalink
fix: state-based receipt notification rejection
Browse files Browse the repository at this point in the history
Signed-off-by: Alexis Asseman <[email protected]>
  • Loading branch information
aasseman committed Nov 10, 2023
1 parent 31886ff commit 4d95b3f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tap-agent/src/tap/sender_allocation_relationship.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@ impl SenderAllocationRelationship {
&self,
new_receipt_notification: NewReceiptNotification,
) {
// If we're in the last rav pending state, we don't want to process any new receipts.
if self.state().await == State::LastRavPending {
// If we're in the last rav pending state or finished, we don't want to process any new
// receipts.
if self.state().await != State::Running {
error!(
"Received a new receipt notification for allocation {} and sender {} while \
the last RAV is pending. This should not have happened since this allocation \
and/or sender is not eligible anymore.",
"Received a new receipt notification for now ineligible allocation {} and \
sender {}.",
self.inner.allocation_id, self.inner.sender
);
return;
Expand Down

0 comments on commit 4d95b3f

Please sign in to comment.