diff --git a/src/FieldLogger.Sync/OutboundStore.cs b/src/FieldLogger.Sync/OutboundStore.cs index d2c31e4..2d5b069 100644 --- a/src/FieldLogger.Sync/OutboundStore.cs +++ b/src/FieldLogger.Sync/OutboundStore.cs @@ -98,10 +98,12 @@ public sealed class SqliteOutboundStore : IOutboundStore { await _db.CreateTableAsync(); // A process crash can leave rows in-flight after the broker accepted them but before - // the application ack was applied. Requeue them; pointId makes the replay idempotent. + // the application ack was applied. Requeue them for immediate replay; pointId makes + // the replay idempotent. A zero due-time also keeps recovery independent of whichever + // clock implementation the sync engine uses. await _db.ExecuteAsync( "UPDATE outbound SET Status = ?, NextAttemptUnixMs = ? WHERE Status = ?", - (int)OutboundStatus.Pending, DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(), + (int)OutboundStatus.Pending, 0, (int)OutboundStatus.InFlight); }