From 7c540d3e4498a8937ebf7c9c27f123eb50a2fd76 Mon Sep 17 00:00:00 2001 From: patterniha Date: Mon, 24 Mar 2025 17:24:20 +0330 Subject: [PATCH] Optimize timeoutMs --- app/dns/nameserver.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/dns/nameserver.go b/app/dns/nameserver.go index 774d87c3..16992543 100644 --- a/app/dns/nameserver.go +++ b/app/dns/nameserver.go @@ -165,13 +165,11 @@ func NewClient( } } - var timeoutMs time.Duration + var timeoutMs = 4000 * time.Millisecond if ns.TimeoutMs > 0 { timeoutMs = time.Duration(ns.TimeoutMs) * time.Millisecond - } else { - timeoutMs = 4000 * time.Millisecond } - + client.server = server client.clientIP = clientIP client.skipFallback = ns.SkipFallback