Skip to content

Commit

Permalink
Ensure single subscription to Gate opening events
Browse files Browse the repository at this point in the history
  • Loading branch information
glopesdev committed Apr 1, 2023
1 parent 12e0355 commit 606d6fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Bonsai.Core/ObservableCombinators.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public static IObservable<TSource> Gate<TSource, TGateOpening>(
this IObservable<TSource> source,
IObservable<TGateOpening> gateOpenings)
{
return source.Window(() => gateOpenings)
return source.Window(gateOpenings)
.SelectMany(window => window.Take(1));
}

Expand Down

0 comments on commit 606d6fe

Please sign in to comment.