File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
src/main/java/io/reactivex Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ public final void onSubscribe(Disposable s) {
39
39
*/
40
40
protected final void cancel () {
41
41
s .dispose ();
42
+ s = null ;
42
43
}
43
44
/**
44
45
* Called once the subscription has been set on this observer; override this
Original file line number Diff line number Diff line change @@ -39,14 +39,18 @@ public final void onSubscribe(Subscription s) {
39
39
* Requests from the upstream Subscription.
40
40
*/
41
41
protected final void request (long n ) {
42
- s .request (n );
42
+ Subscription s = this .s ;
43
+ if (s != null ) {
44
+ s .request (n );
45
+ }
43
46
}
44
47
45
48
/**
46
49
* Cancels the upstream's Subscription.
47
50
*/
48
51
protected final void cancel () {
49
52
s .cancel ();
53
+ s = null ;
50
54
}
51
55
/**
52
56
* Called once the subscription has been set on this observer; override this
You can’t perform that action at this time.
0 commit comments