From c6259885bf8d4b30af249f8cff60da9993b8a3c5 Mon Sep 17 00:00:00 2001 From: Robert Kroeger Date: Sun, 18 May 2014 11:15:59 -0600 Subject: [PATCH] Fix running out of FDs in camget camget runs out of FDs when fetching the contents of a directory with many entries. Close the connections to the server more aggressively to fix this. Change-Id: Iabef20481d3ec12cc5f15e75edc01d0e1e883486 --- cmd/camget/camget.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/camget/camget.go b/cmd/camget/camget.go index 35fc669be..8580e2c0c 100644 --- a/cmd/camget/camget.go +++ b/cmd/camget/camget.go @@ -198,6 +198,7 @@ func smartFetch(src blob.Fetcher, targ string, br blob.Ref) error { _, err = io.Copy(f, r) return err } + rc.Close() switch b.Type() { case "directory":