From 4c1d86409503d20b6661cfd78a05463c78057586 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Wed, 6 Nov 2013 21:27:39 -0800 Subject: [PATCH] fix cleanup --- store/store.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/store/store.go b/store/store.go index 6190e354d..debf1192e 100644 --- a/store/store.go +++ b/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() }