diff --git a/backup.go b/backup.go index 352f3fa..111844c 100644 --- a/backup.go +++ b/backup.go @@ -64,6 +64,9 @@ func Backup(config *BackupConfig) { return nil })) } + + check0(tarWriter.Close()) + check0(tarPipeWriter.Close()) }() tarChunkChan := makeChunks(tarReader, &pool, int64(config.chunkSize)) diff --git a/restore.go b/restore.go index 9ecf0d0..a64646b 100644 --- a/restore.go +++ b/restore.go @@ -102,7 +102,7 @@ func Restore(config *BackupConfig) { } }) - rawTarReader := syncronizeBuffers(decompressedBufferChan) + rawTarReader := syncronizeBuffers(decompressedBufferChan, &pool) tarReader := tar.NewReader(rawTarReader) for {