mirror of
https://github.com/restic/restic.git
synced 2025-12-03 20:51:47 +00:00
Fix rare 'file already closed' during restore
Fixes #2183 Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
This commit is contained in:
committed by
Alexander Neumann
parent
65b476ead9
commit
bf9a507148
@@ -23,8 +23,8 @@ import (
|
||||
const (
|
||||
workerCount = 8
|
||||
|
||||
// max number of open output file handles
|
||||
filesWriterCount = 32
|
||||
// max number of cached open output file handles
|
||||
filesWriterCacheCap = 32
|
||||
|
||||
// estimated average pack size used to calculate pack cache capacity
|
||||
averagePackSize = 5 * 1024 * 1024
|
||||
@@ -73,7 +73,7 @@ func newFileRestorer(dst string, packLoader func(ctx context.Context, h restic.H
|
||||
packLoader: packLoader,
|
||||
key: key,
|
||||
idx: idx,
|
||||
filesWriter: newFilesWriter(filesWriterCount),
|
||||
filesWriter: newFilesWriter(filesWriterCacheCap),
|
||||
packCache: newPackCache(packCacheCapacity),
|
||||
dst: dst,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user