all: replace RWMutex with Mutex in places where RLock is not used (#21622)

This commit is contained in:
mr_franklin
2020-10-13 16:58:41 +08:00
committed by GitHub
parent 32341f88e3
commit c37e68e7c1
6 changed files with 6 additions and 7 deletions

View File

@ -153,7 +153,7 @@ type Downloader struct {
cancelWg sync.WaitGroup // Make sure all fetcher goroutines have exited.
quitCh chan struct{} // Quit channel to signal termination
quitLock sync.RWMutex // Lock to prevent double closes
quitLock sync.Mutex // Lock to prevent double closes
// Testing hooks
syncInitHook func(uint64, uint64) // Method to call upon initiating a new sync run