File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
api/src/main/java/io/kafbat/ui/service Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public Mono<ReactiveAdminClient> get(KafkaCluster cluster) {
4141 }
4242
4343 private Mono <ReactiveAdminClient > createAdminClient (KafkaCluster cluster ) {
44- return Mono .fromFuture (CompletableFuture .supplyAsync (() -> {
44+ return Mono .defer (() -> Mono . fromFuture (CompletableFuture .supplyAsync (() -> {
4545 Properties properties = new Properties ();
4646 KafkaClientSslPropertiesUtil .addKafkaSslProperties (cluster .getOriginalProperties ().getSsl (), properties );
4747 properties .putAll (cluster .getProperties ());
@@ -52,7 +52,7 @@ private Mono<ReactiveAdminClient> createAdminClient(KafkaCluster cluster) {
5252 "kafbat-ui-admin-" + Instant .now ().getEpochSecond () + "-" + CLIENT_ID_SEQ .incrementAndGet ()
5353 );
5454 return AdminClient .create (properties );
55- })).flatMap (ac -> ReactiveAdminClient .create (ac ).doOnError (th -> ac .close ()))
55+ }))) .flatMap (ac -> ReactiveAdminClient .create (ac ).doOnError (th -> ac .close ()))
5656 .onErrorMap (th -> new IllegalStateException (
5757 "Error while creating AdminClient for the cluster " + cluster .getName (), th ));
5858 }
You can’t perform that action at this time.
0 commit comments