Skip to content

Commit

Permalink
publisher: Close file when done
Browse files Browse the repository at this point in the history
Fixes #5062
  • Loading branch information
bep committed Aug 11, 2018
1 parent 2182ecf commit f6ae436
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions publisher/publisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit f6ae436

Please sign in to comment.