diff --git a/src/DotNetty.Common/Concurrency/ScheduledTask.cs b/src/DotNetty.Common/Concurrency/ScheduledTask.cs index 380a45a17..b46579ca3 100644 --- a/src/DotNetty.Common/Concurrency/ScheduledTask.cs +++ b/src/DotNetty.Common/Concurrency/ScheduledTask.cs @@ -29,7 +29,7 @@ protected ScheduledTask(AbstractScheduledEventExecutor executor, PreciseTimeSpan public bool Cancel() { - if (!this.AtomicCancellationStateUpdate(CancellationProhibited, CancellationRequested)) + if (!this.AtomicCancellationStateUpdate(CancellationRequested, CancellationProhibited)) { return false; }