Skip to content

Commit

Permalink
fix(server): use uri from factory without cluster hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
thomashilzendegen authored and gingters committed Jan 31, 2024
1 parent 58eb222 commit 0c53e60
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,11 @@ public static class RelayServerBuilderExtensions
Uri = new Uri(options.Value.Uri),
};
return factory.CreateConnection(AmqpTcpEndpoint.ParseMultiple(options.Value.ClusterHosts ?? factory.Uri.Host),
$"RelayServer {context.OriginId}");
var clientName = $"RelayServer {context.OriginId}";
return options.Value.ClusterHosts == null
? factory.CreateConnection(clientName)
: factory.CreateConnection(AmqpTcpEndpoint.ParseMultiple(options.Value.ClusterHosts), clientName);
});
builder.Services.AddSingleton<ModelFactory<TAcknowledge>>();

Expand Down

0 comments on commit 0c53e60

Please sign in to comment.