Skip to content

Commit

Permalink
fix: close file descriptor after download rename
Browse files Browse the repository at this point in the history
  • Loading branch information
Qingping Hou committed Mar 22, 2020
1 parent 937ad8d commit 9430b58
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/sync/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ func (self *Puller) downloadHandler(task DownloadTask, downloader GenericDownloa
self.errMsgQueue <- fmt.Sprintf("Failed to create file %s for download: %v", tmpfile.Name(), err)
return
}
defer tmpfile.Close()

downloader.Download(tmpfile, &s3.GetObjectInput{
Bucket: aws.String(bucket),
Expand Down

0 comments on commit 9430b58

Please sign in to comment.