Skip to content

Commit 59f18f2

Browse files
yyjdeletenayato
authored andcommitted
Fix that an canceled ScheduledTask can still be executed in rare case (#398)
1 parent e67df79 commit 59f18f2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/DotNetty.Common/Concurrency/ScheduledTask.cs

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

3030
public bool Cancel()
3131
{
32-
if (!this.AtomicCancellationStateUpdate(CancellationProhibited, CancellationRequested))
32+
if (!this.AtomicCancellationStateUpdate(CancellationRequested, CancellationProhibited))
3333
{
3434
return false;
3535
}

0 commit comments

Comments
 (0)