Skip to content

Commit

Permalink
Fix time in AtLeastOnceDeliverySemantic.SetDeliverySnapshot to be con…
Browse files Browse the repository at this point in the history
…sistent with Deliver when RecoveryRunning (#4574)
  • Loading branch information
ismaelhamed authored Oct 12, 2020
1 parent a706ee6 commit 80b9cac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/Akka.Persistence/AtLeastOnceDeliverySemantic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,8 @@ public AtLeastOnceDeliverySnapshot GetDeliverySnapshot()
public void SetDeliverySnapshot(AtLeastOnceDeliverySnapshot snapshot)
{
_deliverySequenceNr = snapshot.CurrentDeliveryId;
DateTime now = DateTime.UtcNow;
// deliver on next tick
var now = DateTime.UtcNow - RedeliverInterval;
_unconfirmed =
snapshot.UnconfirmedDeliveries.Select(
u => new KeyValuePair<long, Delivery>(u.DeliveryId, new Delivery(u.Destination, u.Message, now, 0)))
Expand Down

0 comments on commit 80b9cac

Please sign in to comment.