Fixed DeviceClient not closing the connection on Stat.

This commit is contained in:
Zach Klippenstein 2015-09-05 20:37:40 -07:00
parent b0842f499c
commit 695e0af07b

View file

@ -127,6 +127,7 @@ func (c *DeviceClient) Stat(path string) (*DirEntry, error) {
if err != nil {
return nil, wrapClientError(err, c, "Stat(%s)", path)
}
defer conn.Close()
entry, err := stat(conn, path)
return entry, wrapClientError(err, c, "Stat(%s)", path)