mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-02-20 23:47:21 -05:00
Fix: FakeDNS prints error with empty config (#955)
This commit is contained in:
parent
b68411f460
commit
0d4479a72a
@ -43,7 +43,10 @@ func (*Holder) Type() interface{} {
|
||||
}
|
||||
|
||||
func (fkdns *Holder) Start() error {
|
||||
return fkdns.initializeFromConfig()
|
||||
if fkdns.config != nil && fkdns.config.IpPool != "" && fkdns.config.LruSize != 0 {
|
||||
return fkdns.initializeFromConfig()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (fkdns *Holder) Close() error {
|
||||
@ -184,9 +187,10 @@ func (h *HolderMulti) Type() interface{} {
|
||||
|
||||
func (h *HolderMulti) Start() error {
|
||||
for _, v := range h.holders {
|
||||
err := v.Start()
|
||||
if err != nil {
|
||||
return newError("Cannot start all fake dns pools").Base(err)
|
||||
if v.config != nil && v.config.IpPool != "" && v.config.LruSize != 0 {
|
||||
if err := v.Start(); err != nil {
|
||||
return newError("Cannot start all fake dns pools").Base(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
Loading…
x
Reference in New Issue
Block a user