Merge pull request #819 from brendanzagaeski/patch-1
[mono.git] / mcs / class / corlib / System.Runtime.CompilerServices / AsyncTaskMethodBuilder_T.cs
index 71fd4b1b81fe57ee3ff498754c38899f2d0e1f72..9d539dfc42dc4f5bc56c71e5d94b8371432b5298 100644 (file)
@@ -76,7 +76,7 @@ namespace System.Runtime.CompilerServices
 
                public void SetException (Exception exception)
                {
-                       if (Task.TrySetException (new AggregateException (exception), exception is OperationCanceledException))
+                       if (Task.TrySetException (new AggregateException (exception), exception is OperationCanceledException, true))
                                return;
 
                        throw new InvalidOperationException ("The task has already completed");