Skip to content

Commit 8d65cd5

Browse files
committed
Set cluster address to the actual host and port of the node advertised by the cluster.
Previously it was set to what the user inputted, which led to errors with localhost not being redirected. Signed-off-by: Argus Li <contactme@chunkeili.com>
1 parent efff6e0 commit 8d65cd5

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)