Skip to content

Commit

Permalink
Remove potential double close of channel (vitessio#10929) (vitessio#921)
Browse files Browse the repository at this point in the history
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 <d.bussink@gmail.com>
  • Loading branch information
dbussink authored Aug 4, 2022
1 parent 0beb3f4 commit 0121e5d
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion go/vt/topo/faketopo/faketopo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 0121e5d

Please sign in to comment.