Merge pull request #3577 from gyuho/storage/watchable_store.go-defer-fix

storage/watchable_store: defer to Unlock s.mu
release-2.3
Yicheng Qin 2015-09-23 07:37:29 -07:00
commit d6db4e6d6b
1 changed files with 1 additions and 1 deletions

View File

@ -177,7 +177,7 @@ func (s *watchableStore) Watcher(key []byte, prefix bool, startRev, endRev int64
cancel := CancelFunc(func() {
s.mu.Lock()
s.mu.Unlock()
defer s.mu.Unlock()
wa.stopWithError(ErrCanceled)
// remove global references of the watcher