fix: support for IPv6 redis connections
Closes #
✅ Checklist
- [x] I have followed every step in the contributing guide
- [ ] The PR title follows the convention.
- [ ] I ran and tested the code works
Testing
While trying to self-host it, I was trying to add a Redis instance as result, I was getting this error in the logs.
[ioredis] Unhandled error event: Error: connect ETIMEDOUT
at TLSSocket.<anonymous> (/triggerdotdev/node_modules/.pnpm/[email protected]/node_modules/ioredis/built/Redis.js:170:41)
at Object.onceWrapper (node:events:631:28)
at TLSSocket.emit (node:events:517:28)
at Socket._onTimeout (node:net:598:8)
at listOnTimeout (node:internal/timers:569:17)
at process.processTimers (node:internal/timers:512:7)
Changelog
By default ioredis set the connection host to IPv4.
The documentation for the family parameter are: https://nodejs.org/docs/latest-v20.x/api/net.html#socketconnectoptions-connectlistener
⚠️ No Changeset found
Latest commit: d308bfa3992968f087c55c6a906b537feaa76e6d
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Thanks for this @mittalyashu - it's quite a risky change in the current state. We'd have to add new (optional) env vars to make this configurable and keep the current default. Tricky since we started using redis in a lot more places. Plenty of clients with their own individual env vars. I'll close this for now, but happy to revisit once the new self-hosting setup is out.