File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
reactivesocket-client/src/main/java/io/reactivesocket/client Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -600,6 +600,8 @@ void close() {
600
600
private class SocketAdder implements Subscriber <ReactiveSocket > {
601
601
private final ReactiveSocketClient factory ;
602
602
603
+ private int errors = 0 ;
604
+
603
605
private SocketAdder (ReactiveSocketClient factory ) {
604
606
this .factory = factory ;
605
607
}
@@ -632,7 +634,11 @@ public void onError(Throwable t) {
632
634
logger .warn ("Exception while subscribing to the ReactiveSocket source" , t );
633
635
synchronized (LoadBalancer .this ) {
634
636
pendingSockets -= 1 ;
635
- activeFactories .add (factory );
637
+ if (++errors < 5 ) {
638
+ activeFactories .add (factory );
639
+ } else {
640
+ logger .warn ("Exception count greater than 5, not re-adding factory {}" , factory .toString ());
641
+ }
636
642
}
637
643
}
638
644
You can’t perform that action at this time.
0 commit comments