This commit is contained in:
Miek Gieben 2013-01-28 21:49:23 +01:00
parent 6dfe504a09
commit 19d93e2181
1 changed files with 2 additions and 2 deletions

View File

@ -56,8 +56,8 @@ func (c *Client) Exchange(m *Msg, a string) (r *Msg, rtt time.Duration, err erro
// ExchangeConn performs an synchronous query. It sends the message m trough the
// connection s and waits for a reply.
func (c *Client) ExchangeConn(m *Msg, s net.Conn) (r *Msg, rtt time.Duration, err error) {
w := &reply{client: c}
if err = w.send(m); err != nil {
w := &reply{client: c, conn: s}
if err = w.send(m); err != nil {
return nil, 0, err
}
r, err = w.receive()