This commit is contained in:
Nan Deng 2014-06-30 15:39:03 -07:00
parent fa1fbe88c1
commit 014165ded6

View File

@ -122,10 +122,8 @@ func (f *FakeEtcdClient) Watch(prefix string, waitIndex uint64, recursive bool,
f.WatchInjectError = injectedError f.WatchInjectError = injectedError
f.nrUnreadyChannels.Done() f.nrUnreadyChannels.Done()
defer func() { // After calling this function, the WatchStop channel will not be ready
// After calling this function, the WatchStop channel will not be ready defer f.nrUnreadyChannels.Add(3)
f.nrUnreadyChannels.Add(3)
}()
select { select {
case <-stop: case <-stop: