File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
rsocket-core/src/main/java/io/rsocket/loadbalance Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2015-2020 the original author or authors.
2
+ * Copyright 2015-2021 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -85,8 +85,8 @@ public void onError(Throwable t) {
85
85
}
86
86
87
87
this .doFinally ();
88
- // terminate upstream which means retryBackoff has exhausted
89
- this .terminate (t );
88
+ // terminate upstream ( retryBackoff has exhausted) and remove from the parent target list
89
+ this .doCleanup (t );
90
90
}
91
91
92
92
@ Override
@@ -108,15 +108,15 @@ protected void doSubscribe() {
108
108
109
109
@ Override
110
110
protected void doOnValueResolved (RSocket value ) {
111
- value .onClose ().subscribe (null , t -> this . doCleanup (), this :: doCleanup );
111
+ value .onClose ().subscribe (null , this :: doCleanup , () -> doCleanup (ON_DISPOSE ) );
112
112
}
113
113
114
- void doCleanup () {
114
+ void doCleanup (Throwable t ) {
115
115
if (isDisposed ()) {
116
116
return ;
117
117
}
118
118
119
- this .dispose ( );
119
+ this .terminate ( t );
120
120
121
121
final RSocketPool parent = this .parent ;
122
122
for (; ; ) {
You can’t perform that action at this time.
0 commit comments