Skip to content

Commit aac052f

Browse files
authored
Fix Akka.Analyzer warnings (#406)
1 parent 1750701 commit aac052f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Akka.Persistence.MongoDb/Journal/MongoDbJournal.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,8 @@ public override async Task ReplayMessagesAsync(
191191
// Do not replay messages if limit equal zero
192192
if (limitValue == 0)
193193
return;
194-
194+
195+
var sender = context.Sender;
195196
using var unitedCts = CreatePerCallCts();
196197
var journalCollection = await GetJournalCollection(unitedCts.Token);
197198

@@ -201,7 +202,7 @@ await MaybeWithTransaction(async (session, ct) =>
201202
.ReplayMessagesQuery(session, persistenceId, fromSequenceNr, toSequenceNr, limitValue)
202203
.ToListAsync(ct);
203204

204-
collections.ForEach(doc => recoveryCallback(ToPersistenceRepresentation(doc, context.Sender)));
205+
collections.ForEach(doc => recoveryCallback(ToPersistenceRepresentation(doc, sender)));
205206
}, unitedCts.Token);
206207
}
207208

0 commit comments

Comments
 (0)