File tree Expand file tree Collapse file tree 1 file changed +20
-22
lines changed
rxjava-core/src/main/java/rx/operators Expand file tree Collapse file tree 1 file changed +20
-22
lines changed Original file line number Diff line number Diff line change @@ -93,29 +93,27 @@ public void onError(Exception e) {
93
93
94
94
@ Override
95
95
public void onNext (Observable <T > args ) {
96
- synchronized (subscription ) {
97
- Subscription previousSubscription = subscription .get ();
98
- if (previousSubscription != null ) {
99
- previousSubscription .unsubscribe ();
100
- }
101
-
102
- subscription .set (args .subscribe (new Observer <T >() {
103
- @ Override
104
- public void onCompleted () {
105
- // Do nothing.
106
- }
107
-
108
- @ Override
109
- public void onError (Exception e ) {
110
- // Do nothing.
111
- }
112
-
113
- @ Override
114
- public void onNext (T args ) {
115
- observer .onNext (args );
116
- }
117
- }));
96
+ Subscription previousSubscription = subscription .get ();
97
+ if (previousSubscription != null ) {
98
+ previousSubscription .unsubscribe ();
118
99
}
100
+
101
+ subscription .set (args .subscribe (new Observer <T >() {
102
+ @ Override
103
+ public void onCompleted () {
104
+ // Do nothing.
105
+ }
106
+
107
+ @ Override
108
+ public void onError (Exception e ) {
109
+ // Do nothing.
110
+ }
111
+
112
+ @ Override
113
+ public void onNext (T args ) {
114
+ observer .onNext (args );
115
+ }
116
+ }));
119
117
}
120
118
}
121
119
You can’t perform that action at this time.
0 commit comments