diff --git a/deferrwl.go b/deferrwl.go index 48bb0b50d2..bf95be244f 100644 --- a/deferrwl.go +++ b/deferrwl.go @@ -1,10 +1,12 @@ package torrent +import "github.com/anacrolix/sync" + // Runs deferred actions on Unlock. Note that actions are assumed to be the results of changes that // would only occur with a write lock at present. The race detector should catch instances of defers // without the write lock being held. type lockWithDeferreds struct { - internal mu //sync.RWMutex + internal sync.RWMutex unlockActions []func() } diff --git a/peer.go b/peer.go index 6bfda7958b..da353d7ce6 100644 --- a/peer.go +++ b/peer.go @@ -28,7 +28,7 @@ type ( Peer struct { // First to ensure 64-bit alignment for atomics. See #262. _stats ConnStats - mu sync.RWMutex + mu mu //sync.RWMutex t *Torrent