do not recreate

This commit is contained in:
Nan Deng 2014-06-30 18:27:41 -07:00
parent 7b432eac5c
commit 101806cb5e

View File

@ -123,13 +123,6 @@ func (f *FakeEtcdClient) Watch(prefix string, waitIndex uint64, recursive bool,
f.condWatchCompleted.Broadcast()
f.condLock.Unlock()
// After calling this function, the WatchStop channel will not be ready
defer func() {
f.condLock.Lock()
f.condWatchCompleted = sync.NewCond(&f.condLock)
f.condLock.Unlock()
}()
select {
case <-stop:
return nil, etcd.ErrWatchStoppedByUser