aboutsummaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorSantiago M. Mola <santi@mola.io>2017-06-27 17:45:29 +0200
committerSantiago M. Mola <santi@mola.io>2017-06-27 17:45:47 +0200
commitc9f5acc2d10ef8c20194ce25bffb1e204b18bfdf (patch)
treef954b632f20c8bcb0c5b9358b0c0500340a4eaa6 /storage
parent2d02297a9156390d1a23584bd9d9833c65998f40 (diff)
downloadgo-git-c9f5acc2d10ef8c20194ce25bffb1e204b18bfdf.tar.gz
fix race on packfile writer
Diffstat (limited to 'storage')
-rw-r--r--storage/filesystem/internal/dotgit/writers.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/filesystem/internal/dotgit/writers.go b/storage/filesystem/internal/dotgit/writers.go
index e0a41a8..531259b 100644
--- a/storage/filesystem/internal/dotgit/writers.go
+++ b/storage/filesystem/internal/dotgit/writers.go
@@ -236,7 +236,7 @@ func (s *syncedReader) Seek(offset int64, whence int) (int64, error) {
}
p, err := s.r.Seek(offset, whence)
- s.read = uint64(p)
+ atomic.StoreUint64(&s.read, uint64(p))
return p, err
}