1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-04 15:02:09 +03:00

Fix CLUSTER_NODES ipv6 address parsing (#2269)

This commit is contained in:
Roman Poleguev
2022-09-19 20:31:21 +03:00
committed by GitHub
parent def9f161e5
commit e1c0580d65
2 changed files with 26 additions and 1 deletions

View File

@@ -85,7 +85,7 @@ export function transformReply(reply: string): Array<RedisClusterMasterNode> {
}
function transformNodeAddress(address: string): RedisClusterNodeAddress {
const indexOfColon = address.indexOf(':'),
const indexOfColon = address.lastIndexOf(':'),
indexOfAt = address.indexOf('@', indexOfColon),
host = address.substring(0, indexOfColon);