Skip to content

Commit 2317a02

Browse files
authored
Merge pull request #255 from valkey-io/fix/localhost-cluster-connection-not-found-for-route
FIX: Set node address to the actual host and port of the node advertised by the cluster
2 parents efff6e0 + 8d65cd5 commit 2317a02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/server/src/connection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ async function connectToCluster(
270270
connectionId: payload.connectionId,
271271
clusterNodes,
272272
clusterId: existingConnection ? existingConnection.clusterId : clusterId,
273-
address: addresses[0],
273+
address: { host: Object.values(clusterNodes)[0].host, port: Object.values(clusterNodes)[0].port },
274274
credentials,
275275
keyEvictionPolicy,
276276
clusterSlotStatsEnabled,

0 commit comments

Comments
 (0)