Skip to content

Commit

Permalink
fix(groupBy): ensures durationSelector subscriptions are cleaned
Browse files Browse the repository at this point in the history
The subscriptions to the durationSelector would pile up in the
internal subscription list of the GroupBySubscriber. By maintaining
a map entry per group we can discard subscriptions of a single
group.

Fixes ReactiveX#2661
  • Loading branch information
Mark van Straten authored and hermanbanken committed Jun 13, 2017
1 parent 1a03cc2 commit 160cc06
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/operator/groupBy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ class GroupDurationSubscriber<K, T> extends Subscriber<T> {
}
this.parent.removeGroup(this.key);
this.unsubscribe();
this.parent.remove(this);
}

protected _complete(): void {
Expand All @@ -250,6 +251,7 @@ class GroupDurationSubscriber<K, T> extends Subscriber<T> {
}
this.parent.removeGroup(this.key);
this.unsubscribe();
this.parent.remove(this);
}
}

Expand Down

0 comments on commit 160cc06

Please sign in to comment.