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

Commit

Permalink
<excessive profanity>
Browse files Browse the repository at this point in the history
  • Loading branch information
colinmarc committed Feb 5, 2015
1 parent 22d1a27 commit fbf57d5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions index/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,8 @@ func (index *Index) Get(key string) ([]byte, error) {
fileId, offset := deserializeIndexEntry(b)
f := index.files[fileId]

readLock := index.readLocks[fileId]
readLock.Lock()
defer readLock.Unlock()
index.readLocks[fileId].Lock()
defer index.readLocks[fileId].Unlock()

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

0 comments on commit fbf57d5

Please sign in to comment.