Close the connection

Patch from: Alex Sergeyev
This commit is contained in:
Miek Gieben 2013-01-28 19:27:24 +01:00
parent c0b80818cb
commit c8f880217f
1 changed files with 1 additions and 0 deletions

View File

@ -46,6 +46,7 @@ func (c *Client) Exchange(m *Msg, a string) (r *Msg, rtt time.Duration, err erro
if err = w.dial(); err != nil {
return nil, 0, err
}
defer w.conn.Close()
if err = w.send(m); err != nil {
return nil, 0, err
}