Skip to content

Commit

Permalink
proxy: imp docs
Browse files Browse the repository at this point in the history
  • Loading branch information
schzhn committed Oct 31, 2023
1 parent 543a9a9 commit 3d437e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 2 additions & 3 deletions proxy/dnscontext.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,8 @@ type DNSContext struct {
// localIP - local IP address (for UDP socket to call udpMakeOOBWithSrc)
localIP net.IP

// QueryDuration is the duration of the successful query from an upstream
// DNS server or a fallback DNS server, if exchange with an upstream wasn't
// successful.
// QueryDuration is the duration of a successful query to an upstream
// server or, if the upstream server is unavailable, to a fallback server.
QueryDuration time.Duration

// DoQVersion is the DoQ protocol version. It can (and should) be read from
Expand Down
4 changes: 4 additions & 0 deletions proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,10 @@ func (p *Proxy) replyFromUpstream(d *DNSContext) (ok bool, err error) {
resp, u, err = upstream.ExchangeParallel(upstreams, req)
}

if err != nil {
log.Debug("proxy: replying from %s: %s", src, err)
}

if resp != nil {
rtt := time.Since(start)
log.Debug("proxy: replying from %s: rtt is %s", src, rtt)
Expand Down

0 comments on commit 3d437e6

Please sign in to comment.