diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/booktopipeline/main.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/booktopipeline/main.go b/cmd/booktopipeline/main.go index 6d9f146..6e10475 100644 --- a/cmd/booktopipeline/main.go +++ b/cmd/booktopipeline/main.go @@ -127,6 +127,10 @@ func main() { if err != nil { log.Fatalln("Failed to upload", path, err) } + // Explicitly close here rather than wait for the defer, so we + // don't end up with too many open files which can cause os.Open + // to fail. + file.Close() } verboselog.Println("Sending message", bookname, "to queue", qurl) |