fix
This commit is contained in:
@@ -134,9 +134,11 @@ func (c *Client) streamToS3(snapshot *zfs.Dataset, uploadURL, storageKey string)
|
||||
gzWriter := gzip.NewWriter(pw)
|
||||
|
||||
go func() {
|
||||
defer pw.Close()
|
||||
defer gzWriter.Close()
|
||||
// Copy zfs output to gzip writer
|
||||
io.Copy(gzWriter, zfsOut)
|
||||
// Close gzip writer first to flush footer, then close pipe
|
||||
gzWriter.Close()
|
||||
pw.Close()
|
||||
}()
|
||||
|
||||
reader = pr
|
||||
|
||||
Reference in New Issue
Block a user