Closed
Description
UnionAsyncIterator
has the same issue as reported for UnionIterator
and fixed in .NET 5. It seems as simple as moving the call to SetEnumeratorAsync
up just before the if
.
reactive/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Union.cs
Lines 127 to 134 in bc34728
vs
IEnumerator<TSource> enumerator = enumerable.GetEnumerator();
SetEnumerator(enumerator);
++_state;
if (enumerator.MoveNext())
{
StoreFirst();