mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
grpcproxy: don't wait for ctx.Done() to close kv donec
Causes a goroutine leak in ActiveConnection.Close() tests. Channel is vestigial since removing ccache; revisit if kv ever needs goroutines.
This commit is contained in:
parent
49a0a63fc3
commit
36f5b713bf
@ -33,11 +33,7 @@ func NewKvProxy(c *clientv3.Client) (pb.KVServer, <-chan struct{}) {
|
||||
cache: cache.NewCache(cache.DefaultMaxEntries),
|
||||
}
|
||||
donec := make(chan struct{})
|
||||
go func() {
|
||||
defer close(donec)
|
||||
<-c.Ctx().Done()
|
||||
kv.cache.Close()
|
||||
}()
|
||||
close(donec)
|
||||
return kv, donec
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user