From f6ae436c5878bafeafa0bb2646a2c9b32c9b4380 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sat, 11 Aug 2018 20:19:07 +0200 Subject: [PATCH] publisher: Close file when done Fixes #5062 --- publisher/publisher.go | 1 + 1 file changed, 1 insertion(+) diff --git a/publisher/publisher.go b/publisher/publisher.go index be4472791..de9b03d0d 100644 --- a/publisher/publisher.go +++ b/publisher/publisher.go @@ -108,6 +108,7 @@ func (p DestinationPublisher) Publish(d Descriptor) error { if err != nil { return err } + defer f.Close() _, err = io.Copy(f, src) if err == nil && d.StatCounter != nil {