Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Commit

Permalink
fixed oneshot Observable.TimerFrame send OnCompleted
Browse files Browse the repository at this point in the history
  • Loading branch information
neuecc committed Mar 13, 2015
1 parent 0995bb2 commit 27fe3b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Assets/UniRx/Scripts/UnityEngineBridge/Observable.Unity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,8 @@ static IEnumerator NextFrameCore(IObserver<Unit> observer, FrameCountType frameC
if (!cancellation.IsCancellationRequested)
{
observer.OnNext(Unit.Default);
observer.OnCompleted();
}
observer.OnCompleted();
}

public static IObservable<long> IntervalFrame(int intervalFrameCount, FrameCountType frameCountType = FrameCountType.Update)
Expand Down Expand Up @@ -333,6 +333,7 @@ static IEnumerator TimerFrameCore(IObserver<long> observer, int dueTimeFrameCoun
if (currentFrame++ == dueTimeFrameCount)
{
observer.OnNext(0);
observer.OnCompleted();
break;
}
yield return frameCountType.GetYieldInstruction();
Expand Down

0 comments on commit 27fe3b4

Please sign in to comment.