We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb6ae37 commit b8da4a9Copy full SHA for b8da4a9
rxjava-core/src/main/java/rx/internal/operators/OperatorMulticast.java
@@ -137,8 +137,13 @@ public void call() {
137
}));
138
139
// now that everything is hooked up let's subscribe
140
- if (subscription!=null)
141
- source.unsafeSubscribe(subscription);
+ // as long as the subscription is not null
+ boolean subscriptionIsNull;
142
+ synchronized(guard) {
143
+ subscriptionIsNull = subscription == null;
144
+ }
145
+ if (!subscriptionIsNull)
146
+ source.unsafeSubscribe(subscription);
147
}
148
149
0 commit comments