Skip to content

Commit 7760089

Browse files
yyjdeleteSeabiscuit
authored andcommitted
Fix that an canceled ScheduledTask can still be executed in rare case (Azure#398)
1 parent 23e1c24 commit 7760089

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DotNetty.Common/Concurrency/ScheduledTask.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ protected ScheduledTask(AbstractScheduledEventExecutor executor, PreciseTimeSpan
3333

3434
public bool Cancel()
3535
{
36-
if (!this.AtomicCancellationStateUpdate(CancellationProhibited, CancellationRequested))
36+
if (!this.AtomicCancellationStateUpdate(CancellationRequested, CancellationProhibited))
3737
{
3838
return false;
3939
}

0 commit comments

Comments
 (0)