Skip to content

Commit

Permalink
Merge pull request #47 from projectdiscovery/bug-truncate-err-check
Browse files Browse the repository at this point in the history
Adding missing err check on truncate exchange
  • Loading branch information
ehsandeep authored Mar 3, 2022
2 parents 3ce99ec + 63c6d2f commit 5a9c5bd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,10 @@ func (c *Client) QueryMultiple(host string, requestTypes []uint16) (*DNSData, er

// https://github.com/projectdiscovery/retryabledns/issues/25
if resp.Truncated && c.TCPFallback {
resp, _, _ = c.tcpClient.Exchange(msg, resolver.String())
resp, _, err = c.tcpClient.Exchange(msg, resolver.String())
if err != nil || resp == nil {
continue
}
}

err = dnsdata.ParseFromMsg(resp)
Expand Down

0 comments on commit 5a9c5bd

Please sign in to comment.