Skip to content

Commit

Permalink
Update AutomaticRetryAttribute.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
odinserj committed Oct 16, 2024
1 parent 323f4b5 commit 78cb7f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Hangfire.Core/AutomaticRetryAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ public void OnStateApplied(ApplyStateContext context, IWriteOnlyTransaction tran
/// <inheritdoc />
public void OnStateUnapplied(ApplyStateContext context, IWriteOnlyTransaction transaction)
{
if (context.OldStateName == ScheduledState.StateName)
if (ScheduledState.StateName.Equals(context.OldStateName, StringComparison.OrdinalIgnoreCase))
{
transaction.RemoveFromSet("retries", context.BackgroundJob.Id);
}
Expand Down

0 comments on commit 78cb7f4

Please sign in to comment.