From 101806cb5e152a92e84430d566e04b19146cf2f4 Mon Sep 17 00:00:00 2001 From: Nan Deng Date: Mon, 30 Jun 2014 18:27:41 -0700 Subject: [PATCH] do not recreate --- pkg/util/fake_etcd_client.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pkg/util/fake_etcd_client.go b/pkg/util/fake_etcd_client.go index 68eb2c09d59..c7f3160f06a 100644 --- a/pkg/util/fake_etcd_client.go +++ b/pkg/util/fake_etcd_client.go @@ -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