From bbdd593cc919feffa89260e12aaaa783de835a96 Mon Sep 17 00:00:00 2001 From: steden <1470804@qq.com> Date: Sat, 19 Oct 2024 20:30:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E9=93=BE=E8=B7=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/client.go b/client.go index bf3e177..b95fb1d 100644 --- a/client.go +++ b/client.go @@ -3,13 +3,14 @@ package etcd import ( "context" "encoding/json" + "strings" + "time" + "github.com/farseer-go/fs/container" "github.com/farseer-go/fs/flog" "github.com/farseer-go/fs/trace" etcdV3 "go.etcd.io/etcd/client/v3" "go.etcd.io/etcd/client/v3/concurrency" - "strings" - "time" ) var todo = context.TODO() @@ -163,7 +164,7 @@ func (receiver *client) Watch(ctx context.Context, key string, watchFunc func(ev } entryWatchKey := receiver.traceManager.EntryWatchKey(key) watchFunc(watchEvent) - entryWatchKey.End() + entryWatchKey.End(nil) } } flog.Info("退出了") @@ -182,7 +183,7 @@ func (receiver *client) WatchPrefixKey(ctx context.Context, prefixKey string, wa } entryWatchKey := receiver.traceManager.EntryWatchKey(prefixKey) watchFunc(watchEvent) - entryWatchKey.End() + entryWatchKey.End(nil) } } flog.Info("退出了")