Skip to content

Commit

Permalink
Ensure all created group observables are hot
Browse files Browse the repository at this point in the history
  • Loading branch information
glopesdev committed Oct 16, 2024
1 parent f4ed4e4 commit e101212
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Aeon.Acquisition/CreateGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,13 @@ class GroupedObservable<TKey, TElement> : IGroupedObservable<TKey, TElement>
{
public GroupedObservable(TKey key, IObservable<TElement> source)
{
if (source is null)
{
throw new ArgumentNullException(nameof(source));
}

Key = key;
Source = source ?? throw new ArgumentNullException(nameof(source));
Source = source.Publish().RefCount();
}

public TKey Key { get; }
Expand Down

0 comments on commit e101212

Please sign in to comment.