tcp fixes

This commit is contained in:
Miek Gieben 2011-08-09 15:13:35 +02:00
parent 8a82f129c0
commit 41b0b39432
1 changed files with 3 additions and 3 deletions

View File

@ -246,9 +246,9 @@ func (c *Client) Exchange(m *Msg, a string) (r *Msg, err os.Error) {
var in []byte
switch c.Net {
case "tcp":
in := make([]byte, MaxMsgSize)
case "udp"
in := make([]byte, DefaultMsgSize)
in = make([]byte, MaxMsgSize)
case "udp":
in = make([]byte, DefaultMsgSize)
}
if n, err = c.ExchangeBuffer(out, a, in); err != nil {
return nil, err