Skip to content

Commit

Permalink
Fix that an canceled ScheduledTask can still be executed in rare case (
Browse files Browse the repository at this point in the history
  • Loading branch information
yyjdelete authored and Seabiscuit committed Aug 9, 2018
1 parent 23e1c24 commit 7760089
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DotNetty.Common/Concurrency/ScheduledTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ protected ScheduledTask(AbstractScheduledEventExecutor executor, PreciseTimeSpan

public bool Cancel()
{
if (!this.AtomicCancellationStateUpdate(CancellationProhibited, CancellationRequested))
if (!this.AtomicCancellationStateUpdate(CancellationRequested, CancellationProhibited))
{
return false;
}
Expand Down

0 comments on commit 7760089

Please sign in to comment.