Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
Merge pull request #290 from ddvk/fixsync
Browse files Browse the repository at this point in the history
fix: capture loop variable, should fix #285
  • Loading branch information
ddvk authored Jan 1, 2023
2 parents f5278be + 32f0195 commit 639984c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/sync15/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func getCachedTreePath() (string, error) {
return cacheFile, nil
}

const cacheVersion = 2
const cacheVersion = 3

func loadTree() (*HashTree, error) {
cacheFile, err := getCachedTreePath()
Expand Down
3 changes: 2 additions & 1 deletion api/sync15/tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,9 @@ func (t *HashTree) Mirror(r RemoteStorage, maxconcurrent int) error {
if entry.Hash != doc.Hash {
log.Info.Println("doc updated: ", doc.DocumentID)
e := entry
d := doc
wg.Go(func() error {
return doc.Mirror(e, r)
return d.Mirror(e, r)
})
}
}
Expand Down

0 comments on commit 639984c

Please sign in to comment.