Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -431,11 +431,10 @@ public void Run(IEnumerable<IObservable<TSource>> sources)
{
var j = i;

var d = new SingleAssignmentDisposable();
_subscriptions[j] = d;

var o = new SourceObserver(this, j);
d.Disposable = srcs[j].SubscribeSafe(o);
_subscriptions[j] = o;

o.SetResource(srcs[j].SubscribeSafe(o));
}

SetUpstream(StableCompositeDisposable.CreateTrusted(_subscriptions));
Expand Down Expand Up @@ -496,7 +495,7 @@ private void OnCompleted(int index)
}
}

private sealed class SourceObserver : IObserver<TSource>
private sealed class SourceObserver : SafeObserver<TSource>
{
private readonly _ _parent;
private readonly int _index;
Expand All @@ -507,17 +506,17 @@ public SourceObserver(_ parent, int index)
_index = index;
}

public void OnNext(TSource value)
public override void OnNext(TSource value)
{
_parent.OnNext(_index, value);
}

public void OnError(Exception error)
public override void OnError(Exception error)
{
_parent.OnError(error);
}

public void OnCompleted()
public override void OnCompleted()
{
_parent.OnCompleted(_index);
}
Expand Down