diff --git a/client.go b/client.go index d6739257..4872418b 100644 --- a/client.go +++ b/client.go @@ -17,7 +17,7 @@ const dnsTimeout time.Duration = 2 * 1e9 // A Conn represents a connection (which may be short lived) to a DNS server. type Conn struct { net.Conn - UDPSize uint16 // Minimum reveive buffer for UDP messages, if > 512 EDNS0, 0 MinMsgSize. + UDPSize uint16 // Minimum reveive buffer for UDP messages, if > 512 EDNS0, 0 MinMsgSize. TsigSecret map[string]string // Secret(s) for Tsig map[], zonename must be fully qualified rtt time.Duration t time.Time diff --git a/client_test.go b/client_test.go index 90ac03a7..848f9716 100644 --- a/client_test.go +++ b/client_test.go @@ -131,7 +131,6 @@ func TestClientAXFRMultipleMessages(t *testing.T) { } */ -/* // not really a test, but shows how to use update leases func TestUpdateLeaseTSIG(t *testing.T) { m := new(Msg) @@ -154,16 +153,8 @@ func TestUpdateLeaseTSIG(t *testing.T) { m.SetTsig("polvi.", HmacMD5, 300, time.Now().Unix()) c.TsigSecret = map[string]string{"polvi.": "pRZgBrBvI4NAHZYhxmhs/Q=="} - co := new(Conn) - w.client = c - w.addr = "127.0.0.1:53" - w.req = m - - if err := w.dial(); err != nil { - t.Fail() - } - if err := w.send(m); err != nil { + _, _, err := c.Exchange(m, "127.0.0.1:53") + if err != nil { t.Fail() } } -*/