- dnsfilter: fix npe in dnsfilter test
This commit is contained in:
parent
0794704f74
commit
a860c8e6ff
|
@ -1038,7 +1038,7 @@ func New(c *Config) *Dnsfilter {
|
|||
TLSHandshakeTimeout: 10 * time.Second,
|
||||
ExpectContinueTimeout: 1 * time.Second,
|
||||
}
|
||||
if len(c.ResolverAddress) != 0 {
|
||||
if c != nil && len(c.ResolverAddress) != 0 {
|
||||
resolverAddr = c.ResolverAddress
|
||||
d.transport.DialContext = customDialContext
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue