소스 검색

fix cleanup

Xiang Li 12 년 전
부모
커밋
4c1d864095
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      store/store.go

+ 1 - 2
store/store.go

@@ -444,7 +444,7 @@ func (s *store) deleteExpiredKeys(cutoff time.Time, index uint64, term uint64) {
 	for {
 		node := s.ttlKeyHeap.top()
 		if node == nil || node.ExpireTime.After(cutoff) {
-			return
+			break
 		}
 
 		s.ttlKeyHeap.pop()
@@ -453,7 +453,6 @@ func (s *store) deleteExpiredKeys(cutoff time.Time, index uint64, term uint64) {
 		s.Stats.Inc(ExpireCount)
 		s.WatcherHub.notify(newEvent(Expire, node.Path, s.Index, s.Term))
 	}
-
 	s.WatcherHub.clearPendingWatchers()
 }