mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Options: Use DialContext by default
Use net.Dialer DialContext by default because go-redis supports contexts. Resolves #1101
This commit is contained in:
@ -112,7 +112,7 @@ func (opt *Options) init() {
|
||||
KeepAlive: 5 * time.Minute,
|
||||
}
|
||||
if opt.TLSConfig == nil {
|
||||
return netDialer.Dial(network, addr)
|
||||
return netDialer.DialContext(ctx, network, addr)
|
||||
}
|
||||
return tls.DialWithDialer(netDialer, opt.Network, opt.Addr, opt.TLSConfig)
|
||||
}
|
||||
|
Reference in New Issue
Block a user