Skip to content

Commit df4518c

Browse files
Kristopher Akinsjeremydmiller
authored andcommitted
Fixed native scheduling conditional in MessageContext
1 parent e4fff72 commit df4518c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/Wolverine/Runtime/MessageContext.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,18 @@ public async Task FlushOutgoingMessagesAsync()
6161
{
6262
if (envelope.IsScheduledForLater(DateTimeOffset.UtcNow))
6363
{
64-
if (envelope.Sender!.SupportsNativeScheduledSend)
64+
if (!envelope.Sender!.IsDurable)
6565
{
66-
await sendEnvelopeAsync(envelope);
67-
}
68-
else if (!envelope.Sender!.IsDurable)
69-
{
70-
Runtime.ScheduleLocalExecutionInMemory(envelope.ScheduledTime!.Value, envelope);
71-
}
72-
else
73-
{
74-
await sendEnvelopeAsync(envelope);
66+
if (envelope.Sender!.SupportsNativeScheduledSend)
67+
{
68+
await sendEnvelopeAsync(envelope);
69+
}
70+
else
71+
{
72+
Runtime.ScheduleLocalExecutionInMemory(envelope.ScheduledTime!.Value, envelope);
73+
}
7574
}
75+
7676
// If NullMessageStore, then we're calling a different Send method that is marking the message
7777
if (Runtime.Storage is not NullMessageStore)
7878
{

0 commit comments

Comments
 (0)