Skip to content

Commit

Permalink
feat: Enable dual-stack resolving for ioredis
Browse files Browse the repository at this point in the history
  • Loading branch information
geekdada committed Dec 31, 2024
1 parent 5d1941c commit d28922b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/redis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ const prepareRedis = () => {
if (customRedis) {
client = new customRedis(_redisURL)
} else {
client = new Redis(_redisURL)
client = new Redis(
_redisURL.includes('?')
? `${_redisURL}&family=0`
: `${_redisURL}?family=0`,
)
}

return client as Redis
Expand Down

0 comments on commit d28922b

Please sign in to comment.