File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
rsocket-core/src/main/java/io/rsocket/core Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ abstract class RequestOperator
23
23
Fuseable .QueueSubscription <Payload >,
24
24
Fuseable {
25
25
26
+ final CorePublisher <Payload > source ;
26
27
final String errorMessageOnSecondSubscription ;
27
28
28
29
CoreSubscriber <? super Payload > actual ;
@@ -38,8 +39,8 @@ abstract class RequestOperator
38
39
AtomicIntegerFieldUpdater .newUpdater (RequestOperator .class , "wip" );
39
40
40
41
RequestOperator (CorePublisher <Payload > source , String errorMessageOnSecondSubscription ) {
42
+ this .source = source ;
41
43
this .errorMessageOnSecondSubscription = errorMessageOnSecondSubscription ;
42
- source .subscribe (this );
43
44
WIP .lazySet (this , -1 );
44
45
}
45
46
@@ -52,6 +53,7 @@ public void subscribe(Subscriber<? super Payload> actual) {
52
53
public void subscribe (CoreSubscriber <? super Payload > actual ) {
53
54
if (this .wip == -1 && WIP .compareAndSet (this , -1 , 0 )) {
54
55
this .actual = actual ;
56
+ source .subscribe (this );
55
57
actual .onSubscribe (this );
56
58
} else {
57
59
Operators .error (actual , new IllegalStateException (this .errorMessageOnSecondSubscription ));
You can’t perform that action at this time.
0 commit comments