Use recommendation from RFC5966 and set idle timeout much lower
This commit is contained in:
parent
2c3eafab12
commit
717a8179f5
|
@ -13,7 +13,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const dnsTimeout time.Duration = 2 * 1e9
|
const dnsTimeout time.Duration = 2 * 1e9
|
||||||
const tcpIdleTimeout time.Duration = 1 * time.Minute
|
const tcpIdleTimeout time.Duration = 8 * time.Second
|
||||||
|
|
||||||
// A Conn represents a connection to a DNS server.
|
// A Conn represents a connection to a DNS server.
|
||||||
type Conn struct {
|
type Conn struct {
|
||||||
|
|
|
@ -195,7 +195,7 @@ type Server struct {
|
||||||
UDPSize int // default buffer size to use to read incoming UDP messages
|
UDPSize int // default buffer size to use to read incoming UDP messages
|
||||||
ReadTimeout time.Duration // the net.Conn.SetReadTimeout value for new connections
|
ReadTimeout time.Duration // the net.Conn.SetReadTimeout value for new connections
|
||||||
WriteTimeout time.Duration // the net.Conn.SetWriteTimeout value for new connections
|
WriteTimeout time.Duration // the net.Conn.SetWriteTimeout value for new connections
|
||||||
IdleTimeout func() time.Duration // TCP idle timeout for multilpe queries, if nil, defaults to 1 time.Minute (RFC 5966)
|
IdleTimeout func() time.Duration // TCP idle timeout for multilpe queries, if nil, defaults to 8 * time.Second (RFC 5966)
|
||||||
TsigSecret map[string]string // secret(s) for Tsig map[<zonename>]<base64 secret>
|
TsigSecret map[string]string // secret(s) for Tsig map[<zonename>]<base64 secret>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue