Pull request 1784: 5631-lookup-panic
Merge in DNS/adguard-home from 5631-lookup-panic to master Updates #5631. Squashed commit of the following: commit 0ec578485bd955146d9119b6b8dafda33bfcefad Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Mar 24 20:42:26 2023 +0500 all: imp code, log changes commit fc43c39418640af4864ec3b5bc92ec31ec9cd018 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Mar 24 20:15:27 2023 +0500 home: handle error, upd proxy
This commit is contained in:
@@ -896,13 +896,14 @@ func customDialContext(ctx context.Context, network, addr string) (conn net.Conn
|
||||
}
|
||||
|
||||
addrs, err := Context.dnsServer.Resolve(host)
|
||||
log.Debug("dnsServer.Resolve: %s: %v", host, addrs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("resolving %q: %w", host, err)
|
||||
}
|
||||
|
||||
log.Debug("dnsServer.Resolve: %q: %v", host, addrs)
|
||||
|
||||
if len(addrs) == 0 {
|
||||
return nil, fmt.Errorf("couldn't lookup host: %s", host)
|
||||
return nil, fmt.Errorf("couldn't lookup host: %q", host)
|
||||
}
|
||||
|
||||
var dialErrs []error
|
||||
|
||||
Reference in New Issue
Block a user