mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-05-01 21:50:29 +03:00
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:
parent
d859a33787
commit
fb7b8bba6a
4 changed files with 13 additions and 13 deletions
internal/home
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue