Skip to content
This repository was archived by the owner on Mar 5, 2024. It is now read-only.

Commit fbf57d5

Browse files
committed
<excessive profanity>
1 parent 22d1a27 commit fbf57d5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

index/index.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,8 @@ func (index *Index) Get(key string) ([]byte, error) {
164164
fileId, offset := deserializeIndexEntry(b)
165165
f := index.files[fileId]
166166

167-
readLock := index.readLocks[fileId]
168-
readLock.Lock()
169-
defer readLock.Unlock()
167+
index.readLocks[fileId].Lock()
168+
defer index.readLocks[fileId].Unlock()
170169

171170
_, err = f.file.Seek(offset, os.SEEK_SET)
172171
if err != nil {

0 commit comments

Comments
 (0)