Skip to content

Commit 4049e15

Browse files
Fix start.
1 parent 63f4a01 commit 4049e15

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

sdk/Notifo.SDK/CommandQueue/DefaultCommandQueue.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ public DefaultCommandQueue(
3939
this.maxRetries = maxRetries;
4040
this.timeout = timeout;
4141

42-
foreach (var trigger in commandTriggers)
43-
{
44-
trigger.Start(this);
45-
}
46-
4742
task = Task.Run(RunAsync);
4843
}
4944

@@ -118,14 +113,17 @@ private async Task RunAsync()
118113
{
119114
retryQueue.Enqueue(command);
120115
}
121-
122-
Trigger();
123116
}
124117
catch (Exception ex)
125118
{
126119
OnError?.Invoke(this, new NotificationErrorEventArgs(Strings.CommandError, ex, this));
127120
}
128121

122+
foreach (var trigger in commandTriggers)
123+
{
124+
trigger.Start(this);
125+
}
126+
129127
try
130128
{
131129
foreach (var enqueued in queue.GetConsumingEnumerable())

0 commit comments

Comments
 (0)