We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 76164c6 commit e372a6bCopy full SHA for e372a6b
src/FSharpPlus/Extensions/Extensions.fs
@@ -132,7 +132,10 @@ module Extensions =
132
computation,
133
ts.SetResult,
134
(function
135
- | :? AggregateException as agg -> ts.SetException agg.InnerExceptions
+ | :? AggregateException as aex ->
136
+ let exns = aex.InnerExceptions
137
+ if exns.Count = 0 then ts.SetException aex
138
+ else ts.SetException exns
139
| exn -> ts.SetException exn),
140
(fun _ -> ts.SetCanceled ()),
141
cancellationToken)
0 commit comments