Skip to content

Commit d91e223

Browse files
committed
Increase timeout to 5m
1 parent 82d1303 commit d91e223

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

redisdump/redisdump.go

+8-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,14 @@ func DumpDB(redisHost string, redisPort int, redisPassword string, db uint8, fil
293293
}()
294294

295295
redisURL := RedisURL(redisHost, fmt.Sprint(redisPort), fmt.Sprint(db), redisPassword)
296-
client, err := radix.NewPool("tcp", redisURL, nWorkers)
296+
297+
customConnFunc := func(network, addr string) (radix.Conn, error) {
298+
return radix.Dial(network, addr,
299+
radix.DialTimeout(5 * time.Minute),
300+
)
301+
}
302+
303+
client, err := radix.NewPool("tcp", redisURL, nWorkers, radix.PoolConnFunc(customConnFunc))
297304
if err != nil {
298305
return err
299306
}

0 commit comments

Comments
 (0)