Skip to content

Commit 6eed05f

Browse files
committed
Unsubscribe check on add.
1 parent 366598a commit 6eed05f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/rx/internal/util/SubscriptionList.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ public boolean isUnsubscribed() {
6060
* the {@link Subscription} to add
6161
*/
6262
public void add(final Subscription s) {
63+
if (s.isUnsubscribed()) {
64+
return;
65+
}
6366
if (!unsubscribed) {
6467
synchronized (this) {
6568
if (!unsubscribed) {

0 commit comments

Comments
 (0)