mirror of
https://github.com/miekg/dns.git
synced 2025-11-03 20:21:24 +01:00
tcp fixes
This commit is contained in:
parent
8a82f129c0
commit
41b0b39432
@ -246,9 +246,9 @@ func (c *Client) Exchange(m *Msg, a string) (r *Msg, err os.Error) {
|
|||||||
var in []byte
|
var in []byte
|
||||||
switch c.Net {
|
switch c.Net {
|
||||||
case "tcp":
|
case "tcp":
|
||||||
in := make([]byte, MaxMsgSize)
|
in = make([]byte, MaxMsgSize)
|
||||||
case "udp"
|
case "udp":
|
||||||
in := make([]byte, DefaultMsgSize)
|
in = make([]byte, DefaultMsgSize)
|
||||||
}
|
}
|
||||||
if n, err = c.ExchangeBuffer(out, a, in); err != nil {
|
if n, err = c.ExchangeBuffer(out, a, in); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user