mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
dns: SetDeadline for all remote connection
This commit is contained in:
1 parent
515a5dffa5
commit
14b072832d
4 files changed
+6
-5
No files matched your search
+1
-3
@@ -149,9 +149,7 @@ func (c *Client) exchange(qname string, reqBytes []byte, preferTCP bool) (server
|
||||
defer rc.Close()
|
||||
|
||||
// TODO: support timeout setting for different upstream server
|
||||
if len(servers) > 1 {
|
||||
rc.SetDeadline(time.Now().Add(time.Duration(c.config.Timeout) * time.Second))
|
||||
}
|
||||
rc.SetDeadline(time.Now().Add(time.Duration(c.config.Timeout) * time.Second))
|
||||
|
||||
switch network {
|
||||
case "tcp":
|
||||
|
||||
Reference in new issue
Block a user