File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/main/java/rx/internal/operators Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -71,10 +71,10 @@ public void call(final Subscriber<? super T> subscriber) {
71
71
source .connect (onSubscribe (subscriber , writeLocked ));
72
72
} finally {
73
73
// need to cover the case where the source is subscribed to
74
- // outside of this class thus preventing the above Action1
75
- // being called
74
+ // outside of this class thus preventing the Action1 passed
75
+ // to source.connect above being called
76
76
if (writeLocked .get ()) {
77
- // Action1 was not called
77
+ // Action1 passed to source.connect was not called
78
78
lock .unlock ();
79
79
}
80
80
}
@@ -129,6 +129,8 @@ public void onCompleted() {
129
129
subscriber .onCompleted ();
130
130
}
131
131
void cleanup () {
132
+ // on error or completion we need to unsubscribe the base subscription
133
+ // and set the subscriptionCount to 0
132
134
lock .lock ();
133
135
try {
134
136
if (baseSubscription == currentBase ) {
You can’t perform that action at this time.
0 commit comments