Skip to content

Commit fb082d6

Browse files
authored
fix: default IP family selection to 0 (#2028)
A 30th birthday gift to IPv6. Closes: #2026
1 parent 8dad79f commit fb082d6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/redis/RedisOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ export const DEFAULT_REDIS_OPTIONS: RedisOptions = {
213213
// Connection
214214
port: 6379,
215215
host: "localhost",
216-
family: 4,
216+
family: 0,
217217
connectTimeout: 10000,
218218
disconnectTimeout: 2000,
219219
retryStrategy: function (times) {

test/unit/redis.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ describe("Redis", () => {
1414
option = getOption();
1515
expect(option).to.have.property("port", 6379);
1616
expect(option).to.have.property("host", "localhost");
17-
expect(option).to.have.property("family", 4);
17+
expect(option).to.have.property("family", 0);
1818

1919
option = getOption(6380);
2020
expect(option).to.have.property("port", 6380);

0 commit comments

Comments
 (0)