From 0121e5d09f978f19fc35c8a7e5362a65255f005c Mon Sep 17 00:00:00 2001 From: Dirkjan Bussink Date: Thu, 4 Aug 2022 19:13:02 +0200 Subject: [PATCH] Remove potential double close of channel (#10929) (#921) The refactor of the Watch implementation led me to accidentally adding this to the watcher, but we should keep the same implementation and not add those close here. Signed-off-by: Dirkjan Bussink --- go/vt/topo/faketopo/faketopo.go | 1 - 1 file changed, 1 deletion(-) diff --git a/go/vt/topo/faketopo/faketopo.go b/go/vt/topo/faketopo/faketopo.go index 4e0a1b5409c..57721b346b3 100644 --- a/go/vt/topo/faketopo/faketopo.go +++ b/go/vt/topo/faketopo/faketopo.go @@ -304,7 +304,6 @@ func (f *FakeConn) Watch(ctx context.Context, filePath string) (*topo.WatchData, f.watches[filePath] = append(f.watches[filePath], notifications) go func() { - defer close(notifications) <-ctx.Done() watches, isPresent := f.watches[filePath] if !isPresent {