fix (pre-emptive): Fix typo (check val == 1, not 0)
Bugs (fixed): The IObservable.StopAfter ext fn never actually stops the sequence (even after the timeout expires).
This commit is contained in:
1 parent
d5de60bc21
commit
2008478378
1 file changed
+2
-2
@@ -324,14 +324,14 @@ namespace System.Reactive.Linq {
|
||||
}
|
||||
|
||||
void on_complete() {
|
||||
if (Interlocked.Increment(ref state) == 0) {
|
||||
if (Interlocked.Increment(ref state) == 1) {
|
||||
o.OnCompleted();
|
||||
Disposable.dispose(ref sub);
|
||||
}
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
if (Interlocked.Increment(ref state) == 0) {
|
||||
if (Interlocked.Increment(ref state) == 1) {
|
||||
Disposable.dispose(ref sub);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user