]> Sergey Matveev's repositories - btrtrc.git/blobdiff - t.go
Drop support for go 1.20
[btrtrc.git] / t.go
diff --git a/t.go b/t.go
index af4fdec7f3c000cc6ab2fd36cb5204ac891c403a..45856cc7acbeaa5988074f74435d078a49111a57 100644 (file)
--- a/t.go
+++ b/t.go
@@ -235,8 +235,8 @@ func (t *Torrent) Files() []*File {
 
 func (t *Torrent) AddPeers(pp []PeerInfo) (n int) {
        t.cl.lock()
+       defer t.cl.unlock()
        n = t.addPeers(pp)
-       t.cl.unlock()
        return
 }