From 64fadf6d7abc46efc389510ce1a5556312759396 Mon Sep 17 00:00:00 2001 From: Gregorius Soedharmo Date: Wed, 12 Jul 2023 22:11:02 +0700 Subject: [PATCH] Fix missing ClusterClient default config when clustering was not used. --- .../AkkaClusterHostingExtensions.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Akka.Cluster.Hosting/AkkaClusterHostingExtensions.cs b/src/Akka.Cluster.Hosting/AkkaClusterHostingExtensions.cs index ba324a4d..e8f1773a 100644 --- a/src/Akka.Cluster.Hosting/AkkaClusterHostingExtensions.cs +++ b/src/Akka.Cluster.Hosting/AkkaClusterHostingExtensions.cs @@ -1302,12 +1302,14 @@ public static AkkaConfigurationBuilder WithClusterClient( if (initialContacts.Count < 1) throw new ArgumentException("Must specify at least one initial contact", nameof(initialContacts)); - return builder.WithActors((system, registry) => - { - var clusterClient = system.ActorOf(ClusterClient.Props( - CreateClusterClientSettings(system.Settings.Config, initialContacts))); - registry.TryRegister(clusterClient); - }); + return builder + .AddHocon(ClusterClientReceptionist.DefaultConfig(), HoconAddMode.Append) + .WithActors((system, registry) => + { + var clusterClient = system.ActorOf(ClusterClient.Props( + CreateClusterClientSettings(system.Settings.Config, initialContacts))); + registry.TryRegister(clusterClient); + }); } ///