You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the url option one cannot connect to IPv6 addresses:
let redis = require('redis');
let c = redis.createClient({ url: 'redis://[::1]:6379', socket: { reconnectStrategy: false } });
c.connect();
results in:
Error: getaddrinfo ENOTFOUND [::1]
at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:118:26)
It works fine when passing the IPv6 address within the hostname:
let redis = require('redis');
let c = redis.createClient({ socket: { reconnectStrategy: false, hostname: '::1', port: 6379 } });
c.connect();
It worked fine with node-redis 3.x, but no longer works with node-redis 4.x. The issue is that the parse function from the url module stripped the square brackets, but the global URL constructor does not:
Description
When using the
url
option one cannot connect to IPv6 addresses:results in:
It works fine when passing the IPv6 address within the
hostname
:It worked fine with node-redis 3.x, but no longer works with node-redis 4.x. The issue is that the
parse
function from theurl
module stripped the square brackets, but the globalURL
constructor does not:Node.js Version
v21.5.0
Redis Server Version
No response
Node Redis Version
4.6.13
Platform
Linux
Logs
The text was updated successfully, but these errors were encountered: