Explorar o código

Clear the enumerator in OnNext

akarnokd %!s(int64=6) %!d(string=hai) anos
pai
achega
87aa2b0a15
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Rx.NET/Source/src/System.Reactive/Linq/Observable/Zip.cs

+ 1 - 1
Rx.NET/Source/src/System.Reactive/Linq/Observable/Zip.cs

@@ -353,7 +353,7 @@ namespace System.Reactive.Linq.ObservableImpl
                         {
                             if (Interlocked.Decrement(ref _enumerationInProgress) != 0)
                             {
-                                currentEnumerator.Dispose();
+                                Interlocked.Exchange(ref _rightEnumerator, DisposedEnumerator)?.Dispose();
                                 wasDisposed = true;
                             }
                         }