]> Sergey Matveev's repositories - btrtrc.git/blobdiff - file.go
Run torrentfs CI on macos
[btrtrc.git] / file.go
diff --git a/file.go b/file.go
index 4fb4982d1a32839581046a7fe972ab46db1e6daf..ed2f5da9ced0e74c87a903d1b160a3793331701d 100644 (file)
--- a/file.go
+++ b/file.go
@@ -156,9 +156,9 @@ func (f *File) SetPriority(prio piecePriority) {
 
 // Returns the priority per File.SetPriority.
 func (f *File) Priority() (prio piecePriority) {
-       f.t.cl.lock()
+       f.t.cl.rLock()
        prio = f.prio
-       f.t.cl.unlock()
+       f.t.cl.rUnlock()
        return
 }