Fixes for weekly.2012-01-20
This commit is contained in:
parent
509464cf35
commit
8c0ecaa61b
|
@ -10,6 +10,7 @@ package dns
|
|||
import (
|
||||
"io"
|
||||
"net"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Incoming (just as in os.Signal)
|
||||
|
@ -127,8 +128,8 @@ type Client struct {
|
|||
Retry bool // retry with TCP
|
||||
QueryChan chan *Request // read DNS request from this channel
|
||||
ReplyChan chan *Exchange // write the reply (together with the DNS request) to this channel
|
||||
ReadTimeout int64 // the net.Conn.SetReadTimeout value for new connections (ns)
|
||||
WriteTimeout int64 // the net.Conn.SetWriteTimeout value for new connections (ns)
|
||||
ReadTimeout time.Duration // the net.Conn.SetReadTimeout value for new connections (ns)
|
||||
WriteTimeout time.Duration // the net.Conn.SetWriteTimeout value for new connections (ns)
|
||||
TsigSecret map[string]string // secret(s) for Tsig map[<zonename>]<base64 secret>
|
||||
Hijacked net.Conn // if set the calling code takes care of the connection
|
||||
// LocalAddr string // Local address to use
|
||||
|
@ -388,8 +389,8 @@ func (w *reply) writeClient(p []byte) (n int, err error) {
|
|||
if err = w.Dial(); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
w.conn.SetWriteTimeout(w.Client().WriteTimeout)
|
||||
w.conn.SetReadTimeout(w.Client().ReadTimeout)
|
||||
w.conn.SetWriteDeadline(time.Now().Add(w.Client().WriteTimeout))
|
||||
w.conn.SetReadDeadline(time.Now().Add(w.Client().ReadTimeout))
|
||||
|
||||
}
|
||||
switch w.Client().Net {
|
||||
|
|
Loading…
Reference in New Issue