diff --git a/src/fiskaltrust.Launcher/Extensions/WebApplicationExtensions.cs b/src/fiskaltrust.Launcher/Extensions/WebApplicationExtensions.cs index c3a09e70..37f4ab4b 100644 --- a/src/fiskaltrust.Launcher/Extensions/WebApplicationExtensions.cs +++ b/src/fiskaltrust.Launcher/Extensions/WebApplicationExtensions.cs @@ -29,6 +29,8 @@ public static WebApplication AddQueueEndpoints(this WebApplication app, IPOS pos { var pipe = new Pipe(); var journal = pos.JournalAsync(new JournalRequest { ftJournalType = type, From = from ?? 0, To = to ?? 0 }); + // Throws if something failed in the request. Does not pop the first element + await journal.FirstAsync(); var _ = Task.Run(async () => { await journal.ForEachAwaitAsync(async b => await pipe.Writer.WriteAsync(new ReadOnlyMemory(b.Chunk.ToArray())));