diff options
Diffstat (limited to 'repo.go')
| -rw-r--r-- | repo.go | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -14,6 +14,10 @@ type Repository struct { packIdx []*packIndex packIdxErr error + midxOnce sync.Once + midx *multiPackIndex + midxErr error + packFiles sync.Map // string, *packFile closeOnce sync.Once } @@ -51,6 +55,12 @@ func (r *Repository) Close() error { } } } + if r.midx != nil { + err := r.midx.Close() + if err != nil && closeErr == nil { + closeErr = err + } + } }) return closeErr } |
