From 695e0af07bb0da7dc574707be02e200342c3cc0b Mon Sep 17 00:00:00 2001 From: Zach Klippenstein Date: Sat, 5 Sep 2015 20:37:40 -0700 Subject: [PATCH] Fixed DeviceClient not closing the connection on Stat. --- device_client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/device_client.go b/device_client.go index 46c1f76..e54eb15 100644 --- a/device_client.go +++ b/device_client.go @@ -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)