lease:Add Unlock before break in loop

release-3.5
Ziheng Liu 2019-10-28 22:52:24 -04:00
parent 84e2788c2e
commit ce61cd4324
1 changed files with 1 additions and 0 deletions

View File

@ -201,6 +201,7 @@ func benchmarkLessorFindExpired(benchSize int, b *testing.B) {
le.mu.Lock()
ls := le.findExpiredLeases(findExpiredLimit)
if len(ls) == 0 {
le.mu.Unlock()
break
}
le.mu.Unlock()