We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0e2bb13 commit 38e87f9Copy full SHA for 38e87f9
1 file changed
dnscrypt-proxy/dnsutils.go
@@ -316,11 +316,12 @@ func DNSExchange(
316
) (*dns.Msg, time.Duration, bool, error) {
317
for {
318
cancelChannel := make(chan struct{})
319
- channel := make(chan DNSExchangeResponse, 6)
+ maxTries := 3
320
+ channel := make(chan DNSExchangeResponse, 2*maxTries)
321
var err error
322
options := 0
323
- for tries := 0; tries < 3; tries++ {
324
+ for tries := 0; tries < maxTries; tries++ {
325
if tryFragmentsSupport {
326
queryCopy := query.Copy()
327
queryCopy.Id += uint16(options)
0 commit comments