mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Extract race tests to separate file. Add more race tests.
This commit is contained in:
10
options.go
10
options.go
@ -60,12 +60,12 @@ func (opt *Options) getNetwork() string {
|
||||
}
|
||||
|
||||
func (opt *Options) getDialer() func() (net.Conn, error) {
|
||||
if opt.Dialer == nil {
|
||||
opt.Dialer = func() (net.Conn, error) {
|
||||
return net.DialTimeout(opt.getNetwork(), opt.Addr, opt.getDialTimeout())
|
||||
}
|
||||
if opt.Dialer != nil {
|
||||
return opt.Dialer
|
||||
}
|
||||
return func() (net.Conn, error) {
|
||||
return net.DialTimeout(opt.getNetwork(), opt.Addr, opt.getDialTimeout())
|
||||
}
|
||||
return opt.Dialer
|
||||
}
|
||||
|
||||
func (opt *Options) getPoolSize() int {
|
||||
|
Reference in New Issue
Block a user